Hi Team
In one of my workflow I am fetching a array of json objects from code node and sending it to HTTP request node.
I am trying to access the output of code node using {{$('Code).all() }} which is returning output in below format
[Array: [{"json": {"in_stock_count": 7, "variant_id": "6454f2304f26828807630fbc", "minimum_stock_count": 0, "available_for_sale_count": 7, "reserved_count": 0}, "pairedItem": {"item": 0}},{"json": {"in_stock_count": 4, "variant_id": "6454f2304f26828807630f9e", "minimum_stock_count": 0, "available_for_sale_count": 4, "reserved_count": 0}, "pairedItem": {"item": 1}},{"json": {"in_stock_count": 12, "variant_id": "6454f2304f26828807630fcc", "minimum_stock_count": 0, "available_for_sale_count": 12, "reserved_count": 0}, "pairedItem": {"item": 2}},{"json": {"in_stock_count": 15, "variant_id": "6454f2304f26828807630fa2", "minimum_stock_count": 0, "available_for_sale_count": 15, "reserved_count": 0}, "pairedItem": {"item": 3}}]]
however I need this json in below format
[
{
“in_stock_count”: 7,
“variant_id”: “6454f2304f26828807630fbc”,
“minimum_stock_count”: 0,
“available_for_sale_count”: 7,
“reserved_count”: 0
},
{
“in_stock_count”: 4,
“variant_id”: “6454f2304f26828807630f9e”,
“minimum_stock_count”: 0,
“available_for_sale_count”: 4,
“reserved_count”: 0
},
{
“in_stock_count”: 12,
“variant_id”: “6454f2304f26828807630fcc”,
“minimum_stock_count”: 0,
“available_for_sale_count”: 12,
“reserved_count”: 0
},
{
“in_stock_count”: 15,
“variant_id”: “6454f2304f26828807630fa2”,
“minimum_stock_count”: 0,
“available_for_sale_count”: 15,
“reserved_count”: 0
}
]
Please suggest me changes I need to do.