Tinderbox v9 Icon

Stream.json.each{action}


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 List   [operators of similar scope]

 Stream parsing   [other Stream parsing operators]

 9.1.0

 


Stream.json.each{ action(s) }

If the top-level element is an array, rebinds the JSON object in turn to each array element. After calling the action block for each element, the JSON object is restored.

For example, if the value of $MyString is [{"price":1}, {"price",2}], then

	$MyList="";
	$MyString.json.each{$MyList += json["price"]*3;}

would set $MyList to "3;6".