I have a JSON string that looks like this:
[
{
"id": "acbPreviewCell",
"width": 80
},
{
"id": "advName",
"width": 170
},
{
"id": "adHeadline",
"width": 150
},
{
"id": "adSize",
"width": 150
},
{
"id": "adProduct",
"width": 150
},
{
"id": "adCategory",
"width": 150
},
{
"id": "adSection",
"width": 150
},
{
"id": "adColor",
"width": 150
},
{
"id": "adTags",
"width": 150
},
{
"id": "adRegions",
"width": 150
},
{
"id": "adStatus",
"width": 150
},
{
"id": "adCreated",
"width": 150
},
{
"id": "adBookingNb",
"width": 150
},
{
"id": "adPickup",
"width": 150
},
{
"id": "folioMeta",
"width": 150
}
]
To help explain further, each of these entries is the ID of a table header, along with the width of that table header. I'm using it within an application so that I can remember a user's custom column width that they set.
I would like to break this JSON string down into a javascript array, so that I can easily access each ID and it's width.
Any help would be appreciated with setting it up as an array and then breaking it down to access the ID and the width. Thank you!