I'm learning to manipulate arrays and objects in Javascript.
This is a list of Objects:
Input:
{ user_id: 1,
name: 'Alice',
created_at: 2018-11-23T20:47:39.618Z,
count: '3' }
{ user_id: 4,
name: 'Daphne',
created_at: 2018-11-19T21:47:39.618Z,
count: '3' }
{ user_id: 2,
name: 'Bob',
created_at: 2018-11-23T18:47:39.618Z,
count: '2' }
{ user_id: 5,
name: 'Evan',
created_at: 2018-11-18T19:47:39.618Z,
count: '2' }
{ user_id: 6,
name: 'Fabia',
created_at: 2018-11-22T23:47:39.618Z,
count: '2' }
Desired Output:
[ { user_id: 1,
name: 'Alice',
created_at: 2018-11-23T20:47:39.618Z,
count: '3' },
{ user_id: 4,
name: 'Daphne',
created_at: 2018-11-19T21:47:39.618Z,
count: '3' },
{ user_id: 2,
name: 'Bob',
created_at: 2018-11-23T18:47:39.618Z,
count: '2' },
{ user_id: 5,
name: 'Evan',
created_at: 2018-11-18T19:47:39.618Z,
count: '2' },
{ user_id: 6,
name: 'Fabia',
created_at: 2018-11-22T23:47:39.618Z,
count: '2' } ]
I'm new to javascript programming. been trying to solve this problem but no solution yet? Anyone, please help?
JSON.stringify(queryresult)and put that in your question.