+1
Beantwoord
Can I retrieve information from the datasource by a value other than it's order within the json file?
Can I retrieve information from the datasource by a value other than it's order within the json file?
json node example:
"id":3550,
"name":"About Aaron",
"author":"",
"info":"",
"type":"Feature",
"pos":"3",
"tags":"tag1,tag2",
"contentUrl":"",
"range":2,
"imgSrc":"\/issue1661\/tocthumbs\/0003.jpg"
value="[datasource:storiesFeed.1.name]" would give me "About Aaron" if this was the first entry within the json feed.
What if it wasn't the first entry, and I wanted to grab the name by it's storyId instead of node order?
json node example:
"id":3550,
"name":"About Aaron",
"author":"",
"info":"",
"type":"Feature",
"pos":"3",
"tags":"tag1,tag2",
"contentUrl":"",
"range":2,
"imgSrc":"\/issue1661\/tocthumbs\/0003.jpg"
value="[datasource:storiesFeed.1.name]" would give me "About Aaron" if this was the first entry within the json feed.
What if it wasn't the first entry, and I wanted to grab the name by it's storyId instead of node order?
Customer support service by UserEcho
Example:
<assign property="var:productId" value="_productId" />
<assign property="datasource:redBox-kiosk-check.source" value="https://api.redbox.com/v3/inventory/stores/[preferences:kioskID]?products=[var:productId]&apiKey=xxxxxxxxxxxxxxxxxxxxxxxxxx" />
<assign property="object:STORYNAME.text" value="[datasource:storiesFeed.2.name]" />
It grabs the second entry within storiesFeed (which is a json file). The json file is located here:
https://joshdev.sendmyad.com/Vortex/s.... So the result of this code would be "About RG3".
Is there a way that I can simply edit this line of code:
<assign property="object:STORYNAME.text" value="[datasource:storiesFeed.2.name]" />
So that I can grab the value "name" by one of the nodes attributes. What if I wanted to get the value of "type", but did not want to grab it by the order of the node, what if i wanted to grab it by the id, which in this case would be '3553'.
Is there something I can write like:
<assign property="object:STORYNAME.text" value="[datasource:storiesFeed.id=3553.type]" />.
<assign property="var:node" value="5" />
<sync delay="2">
<alert message="[datasource:field-list.[var:node].name]"/>
</sync>
In my very first example at the original post, I would like to grab the value of "name" by the value of "id", which in that case would be 3550. I know that I could use:
<assign property="object:STORYNAME.text" value="[datasource:storiesFeed.1.name]" />
to get the value of name if it was the first entry. But I want to get the value of name by the id.