Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save trycf/c932304220899b7c2e1187759dcb1e82 to your computer and use it in GitHub Desktop.
Save trycf/c932304220899b7c2e1187759dcb1e82 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
jsondata = {
"included": [
{
"attributes": {
"carrier": "ABC",
"tracking_number": 991
},
"id": 881,
"type": "shipping_labels"
},
{
"attributes": {
"carrier": "DEF",
"tracking_number": 992
},
"id": 882,
"type": "shipping_labels"
}
]
};
writeDump(jsondata);
</cfscript>
<cfloop array="#jsondata.included#" index="element">
<cfoutput>
Line_item_id: #element.id#<br />
Line_item_type: #element.type#<br />
Line_item_carrier: #element.attributes.carrier#<br />
Line_item_tracking_number: #element.attributes.tracking_number#<br />
<hr>
</cfoutput>
</cfloop>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment