Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing to target with asterisk * does not work #156

Closed
TobiasNx opened this issue Feb 15, 2022 · 1 comment · Fixed by #217
Closed

Writing to target with asterisk * does not work #156

TobiasNx opened this issue Feb 15, 2022 · 1 comment · Fixed by #217

Comments

@TobiasNx
Copy link
Collaborator

TobiasNx commented Feb 15, 2022

add_field("animals[].*.test", "test")
copy_field("C", "animals[].*.C")
set_array("amimals[].*.testArray[]")

results:

{
  "animals" : [ {
    "A" : [ {
      "name" : "Jake"
    } ],
    "B" : [ "First" ]
  }, {
    "A" : [ {
      "name" : "Blacky"
    } ],
    "B" : [ "Second" ]
  } ],
  "C" : "test_2",
  "amimals[].*.testArray" : [ ]
}

expected:

{
	"animals": [
		{
			"A": [{"name":"Jake"}],
			"B": ["First"],
            "test": "test",
            "C": "test_2",
            "testArray": []

		},
		{
			"A": [{"name":"Blacky"}],
			"B": ["Second"],
            "test": "test",
            "C": "test_2",
            "testArray": []
		}
	],
	"C": "test_2"
}

See playground

See test-case: TobiasNx/fix-FunctionalReview-Testing@003b54a

TobiasNx added a commit to TobiasNx/fix-FunctionalReview-Testing that referenced this issue Feb 15, 2022
@fsteeg
Copy link
Member

fsteeg commented Feb 21, 2022

Add as integration test in #160 / revisit after #102.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants