How can I use a value as a key inside a repeating loop
I have a repeating loop going through a list of keys . topic , title , things like that . I have an object where 'topic ' , and 'title ' are keys , and there 's values for them How can extract the value for the keys in the repeating loop ? The attached video explains it pretty clearly . I don 't see how to provide the key so I can get that value out . *selecting one item from the API Thanks Lucas . I 'm clearly missing something in how to use map . I saw a tutorial somewhere but can 't find it now . Because all the data ends up in another array I 'm not sure its the thing . I might need a for -each . Or maybe I can assign to the object from within the formula for the map , I don 't know . My goal : FROM : array [ { "part " : "title " , "answer " : "The Hounds of London " } , { "part " : "author " , "answer " : "John Adams " } , ] TO : object : { "title " : "The Hounds of London " , "author " : "John Adams " , "nextpart " : "whatever " } @Bishop
nope Sorry , I 'm tired lol For the Map formula , set an object with the keys /values you want send book _id =4 it IS sending me an array but I want an object . Here 's why I want an object : for every one of the textareas I 'm displaying , I want to insert the answer they previously typed , and to look it up based on the partname (title , target , author ) is fast . but the data in the database itself is stored in a format that gives me a list . The reason for that was when I tried to store it as an object , which I liked using , that was fine for read , but I was unable to update a single item in that object . Part of this is my lack of experience with xano . Instead of Set Wouldn 't that work if you just need the one object ? Instead of the array , you 'd select the actual value of course Can you paste the data from the API ? [ { "id " :43 , "created _at " :1705984964395 , "user _books _id " :4 , "part " : "title " , "answer " : "The Dogs O Thunda 2 " } , { "id " :2 , "created _at " :1705559774236 , "user _books _id " :4 , "part " : "target " , "answer " : "yourmom " } , { "id " :1 , "created _at " :1705559180909 , "user _books _id " :4 , "part " : "job " , "answer " : "cows2 " } , { "id " :23 , "created _at " :1705607270617 , "user _books _id " :4 , "part " : "blurb " , "answer " : "cows coming home is a dumb book " } , { "id " :37 , "created _at " :1705610895464 , "user _books _id " :4 , "part " : "testman " , "answer " : "cows3 " } ] i am trying to get { p a r t :answer , p a r t :answer } where part is always different there 's going to be over 100 parts and the client needs to be able to change them so it gets a little tricky , cannot hardcode anything Like that ? Gotcha 2 different data structures I tried . the more traditional one , without the json , is easier to update on the xano side . its the one i 'm screwing around with right now , trying to get it into an efficient state for toddle . the 1st one , i would extract the json in one fell swoop and it was already an object for toddle and reading it was fast cause its a hash . but when i went to update a single item in XANO , it was just failing to do that . I was just zeroing in on an answer I think . I would prefer using that version honestly , toddle loves it and its simple to maintain . i just gotta get it to save right . Sounds easier to do that The body in the patch request would have to contain the entire body i can do that but its gonna be quite a bit of data . its doable though . its an entire book , could be hundreds of pages of text . that said , I don 't think that 's entirely correct , I think i can just send a partname and answer . because in xano you can load an entire object record , theoretically alter one of the key /value pairs and then save the value back . This is where i 'm struggling good shit ! 😁 that approach seems a lot simpler yeah its a ton simpler all around . whew Yeah , my thing is ugly AF but i have a designer and design , just getting the functinoality done and this was pretty much the last major thing - saving and loading the answers . Super responsive . First version was on wordpress with javascript - bad news . Very excited to have found toddler . I just don 't like telling people that I 'm searching for more toddlers to help out around the office . They think that 's weird . thankfully the community has a lot of good people feel free to reach out if anything as well









.jpeg/public)