How to edit value of nested object

  • /attachments/1319325572198830141/1319325572362666035/image.png

    saillmone

    26 days ago

    Hello guys,
    I have a "data" variable which groups together several objects.
    I would like, for example, to modify the quantity of the variant items[1].

    I suspect that I should use the Set & get function but I cannot directly reach the right data.

    Can someone help me?

    Thanks guys!
    image.png
  • Lucas G

    26 days ago

    You do indeed use Set
  • Use an array to specify the path to the item you want to edit
  • variant_items.[index].quantity
  • /attachments/1319325572198830141/1319334456561238036/image.png

    saillmone

    26 days ago

    I try as hard as I can but I can't do it haha.

    It must be not very far but I can't find it, thank you in any case!
    image.png
  • Lucas G

    26 days ago

    Don’t add the Get node
  • Just an array for the path
  • /attachments/1319325572198830141/1319398395881721917/image.png

    saillmone

    26 days ago

    Wow, more simple than thought ! I spent like 1h to do it working, but it's working now πŸ˜‰
    Thanks for the advice!
    image.png
    πŸ‘1

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code β€” but accessible to your entire team!

Try toddle β€” it's free!

Β© Copyright 2024 toddle. All rights reserved.