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

Updating line item nested objects #20

Open
owldesign opened this issue Aug 20, 2021 · 1 comment
Open

Updating line item nested objects #20

owldesign opened this issue Aug 20, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@owldesign
Copy link

When I use the update() is there a way to target nested objects?

For example, here is my line item object:

{
     id: 4133
     nonprofit: {
          name: "Product 1",
          message: "message for someone",
     }
     price: 10
     quantity: 1
}

I wanted to use the update() to change the message within the nonprofit object.

Right now the update() only takes "field" key but how can I access that field within the nested object?

I tried doing this but it just add it as a key within the object update(4133, 'nonprofit.message', 10)

Thanks!

@peet86 peet86 added the enhancement New feature or request label Oct 2, 2021
@peet86
Copy link
Owner

peet86 commented Oct 2, 2021

Unfortunately right now deep updates are not possible. Thanks for the suggestion though, I will implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants