Problem updating nested values / addon..
Options
![Toby -2289678](https://us.v-cdn.net/6037124/user_avatars/2289678.jpg)
Toby -2289678
Member ✭
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
{
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
-
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! -
The issue is that whatever data type I set it to, the update doesn't work.
-
- you might find this video helpful for updating object arrays:
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback