All Questions
26
questions
-1
votes
1
answer
24
views
I am trying a display items (events) from db typescript nestjs using handlebars the events are an array of object. Properties of each object undefined
please look at the way i am passing the events check for the issue
@Get('views/users/events')
async findAllEvents(
@Req() req: Request,
@Res() res: Response,
@Query('page') page: number = 1,
@Query(...
0
votes
0
answers
33
views
Why can't I access a property of an object in a loaded array of objects in typescript?
So, I cannot wrap my mind around this problem...
Basically, I have some variables and a constructor in a class:
currentUser: UserModel | null = null;
currentServer: ServerModel | null = null;
...
-1
votes
1
answer
74
views
Adding values to object inside array not working - cannot set property of undefined
I am trying to transform a JSON that was build from a CSV file
[
{
"id_familia": 15,
"relacao": 1,
"occupation": "RESPONSAVEL",
&...
-1
votes
1
answer
69
views
Typescript - Object display correct datas but properties are undefined on access
When I log the entire object all the datas are displayed but when I try to access the properties they are undefined. As if the object's properties where not mapped to their datas.
A component ...
0
votes
0
answers
15
views
Learning to use functions in objects... I can't understand why my function is outputting undefined [duplicate]
So I am creating a simple object with one of the properties being a function... I cannot figure out why when I call it, it outputs undefined!
Here is the code...
const team = {
partner1: "...
1
vote
2
answers
112
views
TypeError: Cannot read property 'MyProperty' of undefined
I have an array of object pairs like so:
0: pairs {_stim1: {img: "images/F111C.png", gender: 0, rating: "3"}, _stim2: {img: "images/F042C.png", gender: 0, rating: "3&...
0
votes
1
answer
125
views
Property is undefined while trying to access property of javascript object
I am getting overwhelmed with this issue, can't figure it out.
I am parsing a sample csv with 5 lines (using csv-parser nodejs module), all the first properties of all 4 objects are undefined.
I ...
0
votes
1
answer
60
views
object property coming up as undefined
Through recursion i'm adding data to the obj['prop'] property in forms of db query results.
let obj = {};
if (obj['prop'] == undefined) {
obj['prop'] = {};
}
console.log(obj);
Why ...
0
votes
3
answers
2k
views
Let undefined property be null value in Laravel
Is there any way to make object undefined property become null value?
Because laravel request object will auto make undefined property become null value like below.
$request->test; // This ...
1
vote
1
answer
95
views
Console Log behaviour - Cannot read Object property
I'm building an angular web app.
In the ngOnInit of the component:
public ngOnInit() {
this.log.debug("INSTANCE", this.Instance);
this.log.debug("ACTIVITY",this.Instance.entity);
this....
2
votes
2
answers
519
views
Javascript object props [duplicate]
The syntax in JavaScript for accessing the property of an object is:
object.property or object["property"] or object[property]
I was trying out this lesson on freeCodeCamp:
var myObj = { gift: "...
0
votes
1
answer
1k
views
IntersectionObserver: "Uncaught TypeError: Cannot read property of undefined" when called onIntersection()
I have following code:
var ObjectOne = {
a : {
b : 4,
...
}
observer : 0,
...
init() {
this.a.b = 5;
...
this.observer ...
0
votes
2
answers
192
views
Comparison with undefined or "undefined" when checking for object property. What is the difference?
I encountered this difference between undefined and "undefined" and I am trying to understand it.
I was checking whether properties in objects are defined or not.
In first example I checked ...
5
votes
3
answers
13k
views
javascript: best way of checking if object has a certain element or property?
Suppose I have this:
var person = { "name": "John Doe", "email": "[email protected]" };
This object only has two elements called name and email. Some persons also have an element age, but this ...
0
votes
3
answers
409
views
Cannot set a property dynamically in an object
My goal is to set properties like name, hidden and no_parent dynamically but it keeps giving me:
TypeError: Cannot set property 'name' of undefined
Even if I initialized scorcroot before passing ...