AnsweredAssumed Answered

Map JSON array to a character field : error : Expected START_ARRAY, found START_OBJECT

Question asked by amudhavani.shanthosh181426 on Sep 15, 2017
Latest reply on Sep 15, 2017 by Adam Arrowsmith

Hi All,

 

My requirement is to map fetch the details from the "uc" array and map to a character field. 

This uc array will be coming only once under the item array. 

When I do the map as shown in the diagrams, it is giving the error : 

 

[Input ProfileLocation: Root/Object/items/Array/ArrayElement1/Object/product_option/Array; DocumentLocation: /Root/Object/items/Array/ArrayElement1/Object/product_option/Array]: Expected START_ARRAY, found START_OBJECT

 

Kindly help.

 

{
"base_currency_code": "USD",
"base_discount_amount": 0,
"base_discount_invoiced": 0,
"base_grand_total": 964.82,
"items": [{
"amount_refunded": 0,
"base_amount_refunded": 0,
"product_option": {
"info_buyRequest": {
"SID": "de8loga1q29v9tkvae24ovg443",
"product": "2544",
"uc": {
"uc_id": "2024",
"qty": 1,
"name": "Men's Monogram Patriot",
"image_url": "http:\/\/combi.liquifire.com\/combi?set=mcolor[silver],leftShieldart[cross_country],leftShieldtext1[],leftShieldtext1[tes],rightShieldart[basketball],rightShieldtext1[2013],rightShieldtext1[],view[top],id[2024],cat[cring]&call=url[file:production\/index.chain.txt]&scale=width[800]&sink=format[png]",
"description": "Description not implemented yet",
"config_id": "34453",
"promo_code": "",
"payment_plan": false,
"item_code": "M MONO P",
"store": null,
"school_code": null,
"product_line": null,
"price": {
"retail": 529.99,
"net": null
},
"data": [{
"question": {
"id": "357",
"value": "SchoolFinder",
"ovfieldname": "SchoolFinder"
},
"answer": {
"id": "5922",
"value": "Texas Military Institute",
"db_name": "TextInput",
"item_code": null
}
}, {
"question": {
"id": "360",
"value": "School Mascot",
"ovfieldname": "SchoolMascot"
},
"answer": {
"id": "5922",
"value": "Panthers",
"db_name": "TextInput",
"item_code": null
}
}
.....
......

Attachments

Outcomes