DEV Community

Kill Me
Kill Me

Posted on

Help with Nested JSON object

Convert nested json object in reactJS?

0

I've been playing with json objects. One of the json object represented by variable 'a'. How do I convert 'a' into 'b'. I'm using ReactJS How do I convert this:

const a = 
{
  "menu_1": {
    "id": "1",
    "menuitem": [
      {
        "value": "1",
        "onclick": "1()"
      }
    ]
  },
  "menu_2": {

Top comments (0)