Hi,
This is not a new issue from what I can see, but solutions that already are on this forum didn’t solve my issue or maybe I’m doing something wrong.
What I’m trying to do is to pass json file from one endpoint to another. To do this I’m using a Webhook where external application is passing json then another Webhook should pass modified json. The problem that I have is with the array filed. When I create data I have String fields. Fields are combined as one.
I tried to use Code with JavaScript as was showed on the forum but I still get at the end appended string not arrays.
I tried both : Solution 1 and Solution 2 but with no positive outcome.
This is my row body I get with my webhook:
{"dataObject":{"general":{"o_classId":"1","o_className":"Product","o_published":true,"o_id":6,"o_parentId":5,"o_type":"object","o_key":"Led Bulb","o_creationDate":1646831088,"o_userOwner":2},"data":{"category":a{"dest_id":"7","id":"7","type":"object","subtype":"Category","published":true,"path":"\/Categories\/Light","index":"1","fullpath":"\/Categories\/Light","classname":"Category","rowId":"7$$1$$object"},{"dest_id":"3","id":"3","type":"object","subtype":"Category","published":true,"path":"\/Categories\/Electro","index":"2","fullpath":"\/Categories\/Electro","classname":"Category","rowId":"3$$2$$object"}],"color":"white","image":{"type":"image","id":5,"parentId":3,"parent":null,"filename":"ledbulb.jpg","path":"\/Lightning images\/","mimetype":"image\/jpeg","creationDate":1646830813,"modificationDate":1646834413,"stream":null,"userOwner":2,"userModification":0,"properties":null,"versions":null,"metadata":e],"locked":null,"customSettings":{"imageDimensionsCalculated":true,"imageWidth":640,"imageHeight":480,"embeddedMetaData":{"FileName":"ledbulb.jpg","FileDateTime":1646830813,"FileSize":32027,"FileType":2,"MimeType":"image\/jpeg","SectionsFound":""},"embeddedMetaDataExtracted":true},"hasMetaData":false,"siblings":null,"hasSiblings":null,"dataChanged":false,"versionCount":1,"dependencies":null,"__dataVersionTimestamp":1646834413,"dao":null,"_fulldump":false,"o_dirtyFields":null,"scheduledTasks":null,"____pimcore_cache_item__":"asset_5"},"name":"Led Bulb"},"metaData":{"category":{"objectid":6,"inherited":false},"color":{"objectid":6,"inherited":false},"image":{"objectid":6,"inherited":false},"name":{"objectid":6,"inherited":false}}},"arguments":g]}
var obj = JSON.parse(inputData.rawjson);
return obj;
but in webhook that is preparing json to be sent I have still those :