| 1234567891011121314151617181920212223242526272829 |
- {
- "name": "verify-template-json",
- "nodes": [
- {"id": "n1", "name": "Trigger", "type": "click-trigger", "position": {"x": 0, "y": 0}, "config": {}},
- {"id": "n2", "name": "Fixture", "type": "code", "position": {"x": 0, "y": 100},
- "config": {"code": "return { name: 'Ada', payload: '{\"nested\":{\"count\":7}}' };"}},
- {"id": "n3", "name": "Parse", "type": "json", "position": {"x": -100, "y": 200},
- "config": {"operation": "parse", "inputField": "data.result.payload", "outputField": "value"}},
- {"id": "n4", "name": "Extract", "type": "json", "position": {"x": -100, "y": 300},
- "config": {"operation": "extract", "inputField": "data.value", "path": "nested.count", "outputField": "count"}},
- {"id": "n5", "name": "Bad", "type": "json", "position": {"x": 100, "y": 200},
- "config": {"operation": "parse", "inputField": "data.result.name", "outputField": "value", "onError": "null"}},
- {"id": "n6", "name": "Render", "type": "template", "position": {"x": 0, "y": 400},
- "config": {"template": "Hello {{data.result.name}}", "outputField": "text"}}
- ],
- "connections": [
- {"sourceNodeId": "n1", "sourceOutput": "main", "targetNodeId": "n2", "targetInput": "data"},
- {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n3", "targetInput": "data"},
- {"sourceNodeId": "n3", "sourceOutput": "main", "targetNodeId": "n4", "targetInput": "data"},
- {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n5", "targetInput": "data"},
- {"sourceNodeId": "n2", "sourceOutput": "main", "targetNodeId": "n6", "targetInput": "data"}
- ],
- "expect": {
- "n3": {"status": "completed", "output": {"value": {"nested": {"count": 7}}}},
- "n4": {"status": "completed", "output": {"count": 7}},
- "n5": {"status": "completed", "output": {"value": null}},
- "n6": {"status": "completed", "output": {"text": "Hello Ada"}}
- }
- }
|