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

copy_field element multiple times into array. replace_all works only once on target path. #250

Open
TobiasNx opened this issue Aug 11, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@TobiasNx
Copy link
Collaborator

in:

{
    "number" : "1234"
}

FIX:

set_array("identifier[]")
copy_field("number", "identifier[].$append.id")
copy_field("number", "identifier[].$append.id")
replace_all("identifier[].*.id","2","?")

out:

{
  "number" : "1234",
  "identifier" : [ {
    "id" : "1234"
  }, {
    "id" : "1?34"
  } ]
}

expected:

{
  "number" : "1234",
  "identifier" : [ {
    "id" : "1?34"
  }, {
    "id" : "1?34"
  } ]
}


see here in playground.

@TobiasNx TobiasNx added the bug Something isn't working label Aug 11, 2022
@blackwinter
Copy link
Member

See also hbz/lobid-resources#1375.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

2 participants