I have these results from calling a function in javascript:
(1, 00), (2, 10), (3, 01), (4, 11)
I want to assign that in an array or json format that will result like this:
[{id:1, number: 00},{id:2, number: 10},{id:3, number: 01},{id:4, number: 11}]
Or anything that will result an array lenght of 4
Is that possible? Please help. Thanks :)
.split()with a delimiter of),to find each pair. Then split that up with a delimiter of,to find each number in the pair.