Problem updating nested values / addon..

Options
Here's the context - I have the following data:

{
name: Bob,
persona: Candidate,
last_modified: 
1637575424287,
tags_id: [
{
0: {
id: 4,
created_at: 1637507343753,
name: Test},
tags_id: 4},
{
0: {
id: 2,
created_at: 1633023749312,
name: Manager},
tags_id: 2}],
}

Question 1: Why are the tags under the 0:?
Question 2: How can I properly update the tags?

Right now I have an API endpoint that finds the Candidate_Id (int) and Tags_id (object[])

Currently doing this:
[image.png]
Yet I've tried a multitude of different ways bit I'm not sure why the endpoint receives the tags_id [4,2] (for example) and but they always set to [0,0] so I don't understand that's up.

Basically how to update a nested bit of data..

Voila,
Thanks,
Toby

Comments

  • Facundo Lucci
    Options
    Hey Toby,
    Facundo here from odnc and bubble learning share. I’m not sure if you can do dot notation on an array without specifying the index. (For example tags_id.0.tags_id) however I’m not sure that will help your problem.

    It looks like you are trying to update an array of integers. Right now you are taking an input of an array of objects. You could set your input to integer and then select list instead of single. Then I think your input of [2,4] should work.
    Or I’m missing what you are trying to do.

    Good to see you in Xano community!
  • Toby -2289678
    Options
    The issue is that whatever data type I set it to, the update doesn't work. 
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
     - you might find this video helpful for updating object arrays: