addons

Options
[FireShot Capture 067 - Xano - x8ki-letl-twmt.n7.xano.io.png]when i setup an addon to reference another table B, i get a array type returned
[{tag_name}], where tag_name is the field name on table B. I name this field in the parent object as role. I was trying to use filter to avoid having an array and object being part of the parent object but rather just role: . I have attached the screen showing my filter use. I have three addons in the same record so I can't just map tag_name to the top level

Comments

  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
     can you clarify, are you saying you want to return a single item instead of a list?
  • mohan ramanujam
    Options
    no, i get a nested structure, and i am trying to see if I can avoid that.
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    Can you show us the response structure from the output tab of your query?
  • mohan ramanujam
    Options
    [FireShot Capture 074 - zwsociety - Profile - Draftbit - build.draftbit.com.png] here is a screenshot from draftbit where i call an api with customized output. The issue is that the addon fields show as arrays. Given the the addon map is just a singleton i would rather have it flat so i don't have to map the array.
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    Looks like it is a matter of return types. You may need a single instead of a list. Check out this video to see if it helps you: https://youtu.be/XKIbVm-jFGE
  • mohan ramanujam
    Options
    worked great. thanks
  • mohan ramanujam
    Options
     a follow-up. Is there a way i can map a nested field as a primary field in the object which is doing the addon. I have a secondary table where the entries have the same field name so i cant solve it just by a single as I did above. Please see the image attached. I want role_name: Eco-investor, profile_status: incomplete, privacy_setting: open[FireShot Capture 075 - Xano - x8ki-letl-twmt.n7.xano.io.png]