Inist-CNRS / node-jbj

Like XSL/XML but for JSON.
http://Inist-CNRS.github.io/jbj-playground/
13 stars 3 forks source link

Add a "getPropertyVar" action #10

Closed parmentf closed 9 years ago

parmentf commented 9 years ago

Like the getProperty action, but taking the value of a variable, instead of a literal:

Ex:

{
  "set": {
    "i": 1,
    "t": ["a","b","c"]
  },
  "getPropertyVar": ["t", "i"]
}

should return

"b"

And

{
  "set": {
    "i" : "b",
    "o" : { "a": 0, "b": 1, "c":2 },
  },
  "getPropertyVar": ["o", "i"]
}

should return

1
parmentf commented 9 years ago

Closed by 08955c6bc3895dd0b68c4f09571c2cc246f4be13