Six Stars

How To Parse Multiple JSON ONY BY ONE

Hi All,

I'm getting response from Web API in multiple JSON and every multiple JSON has unique id but problem occurs here that I'm unable to store multiple JSON in my DB.

 

I'm giving you example my multiple JSON -

 

{
"order": {
"id": 445157867567,

"tax_lines": [{
"price": "4.00",
"rate": 0.04,
"title": "NY STATE TAX"
}, {
"price": "4.50",
"rate": 0.045,
"title": "NY CITY TAX"
}, {
"price": "0.38",
"rate": 0.00375,
"title": "NY SPECIAL TAX"
}],

}
},

 {
"id": 455346257967,

"tax_lines": [{
"price": "4.00",
"rate": 0.04,
"title": "NY STATE TAX"
}, {
"price": "4.50",
"rate": 0.045,
"title": "NY CITY TAX"
}, {
"price": "0.38",
"rate": 0.00375,
"title": "NY SPECIAL TAX"
}],
},

{
"id": 455346257967,

"tax_lines": [{
"price": "4.00",
"rate": 0.04,
"title": "NY STATE TAX"
}, {
"price": "4.50",
"rate": 0.045,
"title": "NY CITY TAX"
}, {
"price": "0.38",
"rate": 0.00375,
"title": "NY SPECIAL TAX"
}],

}

 

Can anyone tell me what I need to for this? I need to insert each record with unique id(which I'm getting from API) one by one.

I have one scenario - When job starts that time I'm getting response in multiple JSON from API and every multiple JSON has unique id, I'm thinking here that somewhere I need to store unique id and based this unique id every JSON execute one by one.

 

Please correct or give me your thoughts. highly appreciated

this is my job -

orders_tax_line.PNG

 

Thanks,

Arpit

 

1 REPLY
Six Stars

Re: How To Parse Multiple JSON ONY BY ONE

Please, expertise, give some suggestion:
I correct my requirement again. I need to execute multiple JSON records one by one because I getting multiple orders id in that JSON file and I need to store every record with respective order id.
@rhall_2_0 @TRF @manodwhb @vapukov @vboppudi @cterenzi @shong