Help me create this json with dictionary

I am trying to create this JSON with dictionary block.

{"create":[

       {

      "regular_price": "100.00",

    

  "image": {

    "src": "https://i.pinimg.com/originals/77/35/dd/7735dd49ea9f5908da97618e43a4d510.jpg"

  },

      "attributes": [

        {

          "name":"weight",

          "option": "1kg"

        }

      ]

    },{

      "regular_price": "100.00",

    

  "image": {

    "src": "https://i.pinimg.com/originals/77/35/dd/7735dd49ea9f5908da97618e43a4d510.jpg"

  },

      "attributes": [

        {

          "name":"weight",

          "option": "5500gm"

        }

      ]

    }

]}

I tried this block to create this

& I got this result

(create({
“regular_price”: 50,
“image”: {
“src”: “https://i.pinimg.com/originals/77/35/dd/7735dd49ea9f5908da97618e43a4d510.jpg”
},
“attribute”: [
{
“name”: “weight”,
“option”: “1kg”
}
]
}{
“regular_price”: 60,
“image”: {
“src”: “https://i.pinimg.com/originals/77/35/dd/7735dd49ea9f5908da97618e43a4d510.jpg”
},
“attribute”: [
{
“name”: “weight”,
“option”: “500g”
}
]
}))

can anyone help me to get the same result as my json

you try with the same by enabling the below option in screen1
(Go to setting> Scroll down>tick on show list as JSON)

1 Like

That’s great. but doesn’t get the same result that i want.
i got this

[
  "create",
  [
    {
      "regular_price": 50,
      "image": {
        "src": "https:\/\/i.pinimg.com\/originals\/77\/35\/dd\/7735dd49ea9f5908da97618e43a4d510.jpg"
      },
      "attribute": [
        {
          "name": "weight",
          "option": "1kg"
        }
      ]
    },
    {
      "regular_price": 60,
      "image": {
        "src": "https:\/\/i.pinimg.com\/originals\/77\/35\/dd\/7735dd49ea9f5908da97618e43a4d510.jpg"
      },
      "attribute": [
        {
          "name": "weight",
          "option": "100g"
        }
      ]
    }
  ]
]

i need : instead of , after create. Can you help me to get this?

Did you refer this guide?

then add make dictionary in-front of key

1 Like

Try this

result is

{
    "create": [
        {
            "regular_price": 50,
            "image": {
                "src": "https:\/\/i.pinimg.com\/originals\/77\/35\/dd\/7735dd49ea9f5908da97618e43a4d510.jpg"
            },
            "attribute": [
                {
                    "name": "weight",
                    "option": "1kg"
                }
            ]
        },
        {
            "regular_price": 60,
            "image": {
                "src": "https:\/\/i.pinimg.com\/originals\/77\/35\/dd\/7735dd49ea9f5908da97618e43a4d510.jpg"
            },
            "attribute": [
                {
                    "name": "weight",
                    "option": "500g"
                }
            ]
        }
    ]
}
2 Likes