How are we going to parse following type of object in angular or javascript, maybe using for search loop or parsing?
I wanted to get the title value and assign it to title because as you can see the value of title is object:
{'title': 'Hey', 'instruction': 'Take a sad song a…75, 'sub_title': 'Jude', 'timelimit': '01:05:01'}
instead of "Hey" as you can see on the example (same also with the second object). Is there a way we can do that?
JSON array of objects format:
[
{
id:0,
title:"{'title': 'Hey', 'instruction': 'Take a sad song a…75, 'sub_title': 'Jude', 'timelimit': '01:05:01'}"
},
{
id:1,
title:"{'title': 'Assessment', 'instruction': 'Jude', 'cr…71, 'sub_title': 'Test', 'timelimit': '06:25:08'}"
}
]
Desired output:
[
{
id:0,
title:"Hey"
},
{
id:1,
title:"Assessment"
}
]