Forum Discussion
Abhishek_Soni37
3 years agoContributor
I created this expression that supports both object and array if that’s how the external system is sending data to Snaplogic. This will work, give it a try. You can do a little fine-tuning to this.
Let me know if this works.
toArray_2023_05_29 (1).slp (7.4 KB)
Cheers,
hi thanks @Soni37,
Works like perfectly except for one thing, I need to add 2 static elements along with the text, I tried a few ways but was not able to add to it. can you point out on how to add that?
“type”:“AttachmentText”,
“intent”:“Supplier”,
[
{
"LINES": [
{
"POSEX": "00010",
"attachments": [
{
"type":"AttachmentText",
"intent":"Supplier",
"text": "KIT,HIGH SPEED PINION (HSP),,<br/>"
},
{
"type":"AttachmentText",
"intent":"Supplier",
"text": "*NSK bearings ,STF*"
}
]
},
{
"POSEX": "00020",
"attachments": [
{
"type":"AttachmentText",
"intent":"Supplier",
"text": ",<br/>,MATERIAL DESCRIPTION :REVERSING"
}
]
}
]
}
]
Thank you again for your help.