简体   繁体   中英

How to send Multiple array body with API in React native

我想用 API 发送的那种类型的 API 数据

i also want to send the value from radio button but i am new in React native that's why i don't know how to send these type of data with API

the value in category is the value that is comes from radio button of yes and no. I don't know how to set these radio button value in categories[0][value]: 1

My code in expo snack for Edit

this is the payload you need to form, add the respective values to it

{
  score_threshold: "",
  categories: [
    {
      sub_category_id: "",
      value: "",
      category_id: "",
      sub_category_name: "",
    },
    {
      sub_category_id: "",
      value: "",
      category_id: "",
      sub_category_name: "",
    },
  ],
};

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM