Hello,
I'm using DATA-INTO Op-code and it works great!
Unfortunately I'm now facing a scenario where I am unable to use DATA-INTO due a couple of issues:
1. variable name in JSON file begins with a _ ("_id").
adding _id field to my data structure determines compilation errors.
{
"orderID": "22276161_6197b1eaa98e9",
"billing": {
"_id": {
"$id": "6197b1e25fb8e0980c824ba4"
}...
2 Items list is not an array , but "dynamic" tags i.e. ."22609963""22566687","22524244"
I don't know how to define or manage these DS with dynamic names
...
"cart": {
"total": 145.8,
"items": {
"22609963": {
"count": 1,
"price": 24.5,,
"title": "Prosecco Superiore DOCG ",
"sku": "SABX",
},
"22566687": {
"count": 1,
"price": 26.7,
"title": "Set Trio ",
"sku": "SETX",
},
"22524244": {
"count": 2,
"price": 15.2,
"title": "Colli Trevigiani IGT ",
"sku": "TRX",
} ....
The json is generated from an external E-Commerce application.
Any help is really appreciated.
Giovanni
I'm using DATA-INTO Op-code and it works great!
Unfortunately I'm now facing a scenario where I am unable to use DATA-INTO due a couple of issues:
1. variable name in JSON file begins with a _ ("_id").
adding _id field to my data structure determines compilation errors.
{
"orderID": "22276161_6197b1eaa98e9",
"billing": {
"_id": {
"$id": "6197b1e25fb8e0980c824ba4"
}...
2 Items list is not an array , but "dynamic" tags i.e. ."22609963""22566687","22524244"
I don't know how to define or manage these DS with dynamic names
...
"cart": {
"total": 145.8,
"items": {
"22609963": {
"count": 1,
"price": 24.5,,
"title": "Prosecco Superiore DOCG ",
"sku": "SABX",
},
"22566687": {
"count": 1,
"price": 26.7,
"title": "Set Trio ",
"sku": "SETX",
},
"22524244": {
"count": 2,
"price": 15.2,
"title": "Colli Trevigiani IGT ",
"sku": "TRX",
} ....
The json is generated from an external E-Commerce application.
Any help is really appreciated.
Giovanni
Comment