-
Notifications
You must be signed in to change notification settings - Fork 147
Open
Description
Hello gays,
Is there a way to do an in-place data update?
For exemple, I have de following rule:
{
"if": [
{ "some": [{ "var": "groups" }, { "==": [{ "var": "name" }, "group_1"] }] },
{ "merge": [{ "var": "" }, [{ "id": 2, "name": "group_2" }]] }
]
}using the following data:
{
"id": 1,
"name": "test",
"groups": [{ "id": 1, "name": "group_1" }],
"tags": [{ "id": 1, "name": "tag_1" }],
"category": {
"id": 1,
"name": "category_1",
"fields": [
{
"id": 1,
"name": "field_1",
"kind": "str",
"value": "hello word"
}
]
}
}then I want, as result, the following:
{
"id": 1,
"name": "test",
"groups": [
{ "id": 1, "name": "group_1" },
{ "id": 2, "name": "group_2" }
],
"tags": [{ "id": 1, "name": "tag_1" }],
"category": {
"id": 1,
"name": "category_1",
"fields": [
{
"id": 1,
"name": "field_1",
"kind": "str",
"value": "hello word"
}
]
}
}As my rule, the field groups in the data was updated to:
[
{ "id": 1, "name": "group_1" },
{ "id": 2, "name": "group_2" }
]Metadata
Metadata
Assignees
Labels
No labels