1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| $ ./sqrl repl sqrl> LET ActionData := {"name": "hi", "user_id": "1.2.3.4"}; { name: 'hi', user_id: '1.2.3.4' } sqrl> LET ActionName := jsonValue(ActionData, "$.name") 'hi' sqrl> LET UserId := jsonValue(ActionData, "$.user_id") '1234' sqrl > LET User := entity('User', UserId) entity<User/1234> { uniqueId<2019-01-18T03:58:57.834Z@1> } sqrl> printSource(ActionName); function() { const f0 = () => bluebird.resolve(functions.attr(this.slots["ActionData"].value(), "name")); return this.load("ActionData").then(f0); }
|