C3 Data Convert Example

2
  • 0 favourites

Index

Stats

1,140 visits, 2,587 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

1D Array

There is an json.

{
	"name": "Fruit",
	"items": [
		"Apple",
		"Banana",
		"Cherry",
		"Strawberry",
		"Mango",
		"Kiwi"
	]
}

you want to store the data of items in the Array Object.

{"is-c3-clipboard-data":true,"type":"events","items":[{"functionName":"TransferArray","functionDescription":"","functionCategory":"","functionReturnType":"none","functionCopyPicked":false,"functionIsAsync":false,"functionParameters":[{"name":"path","type":"string","initialValue":"","comment":""}],"eventType":"function-block","conditions":[],"actions":[{"id":"set-size","objectClass":"Array","parameters":{"width":"0","height":"1","depth":"1"}}],"children":[{"eventType":"block","conditions":[{"id":"repeat","objectClass":"System","parameters":{"count":"JSON.ArraySize(path)"}}],"actions":[{"id":"push","objectClass":"Array","parameters":{"where":"back","value":"JSON.Get(path & \".\" & loopindex)","axis":"x"}}]}]}]}

Use: TransferArray("items")

2D Array

There is an json.

.

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!