Skip to content

#nameOf

Returns the name of the property currently being iterated by a loop variable.

#nameOf(@loopVariable)
Category Loops and scopingValid in Property name
Name Type Description
@loopVariable variable A #foreach variable iterating an object.

string

"#foreach(@x in $.someObject) into 'result'": [ { "#nameOf(@x)": "@x" } ]

#foreach · #keysFrom