I actually use a MySQL query on my server then throw my data using publication (self.added…) and it’s true it wierd because some of my queries are actually working except for this… I am not sure if this because of the complexity of my query
somehow this does not make any sense to me … are you sure the screenshot you showed us in your OP is the actual betsList array? because in that case doing for (var item in this.props.betsList[0]) really should not work!
I think your problem is that you got an Object of Objects instead of Array of Objects. You cannot map Object directly. Can you return Array of Objects easily?
Or you can also use Object.keys() and map that like this way:
SomeObject = {
first: {
sub: 'thing',
},
second: {
sub: 'bar',
},
};
Object.keys(SomeObject).map( (item) => {
const subObj = SomeObject[item];
console.log("this is subObj:", subObj)
}
result should be something like that:
this is subObj: {sub: 'thing'}
this is subObj: {sub: 'bar'}
I hope this is clear example. And of course if you need that key value… it’s ‘item’.