I'm using this package for radio button. What I'm trying is to show the result of an api within Radio button.The api response contains 4 options. So I want to render text with 4 radio buttons but now I'm getting only a single radio button with text.This is how it will be
This is the code
{
this.state.data.map(a => (
<Card>
<CardItem>
<Text style={styl.textStyle}>
{(a.content = a.content.replace(/(<([^>]+)>)/gi, ""))}
</Text>
</CardItem>
<CardItem>
<RadioGroup
size={24}
thickness={2}
color="#9575b2"
highlightColor="#ccc8b9"
selectedIndex={1}
onSelect={item => this._onSelect(item, i++)}
>
<RadioButton value={a.options}>
<Text>{a.options}</Text>
</RadioButton>
</RadioGroup>
</CardItem>
</Card>
));
}
json response
{
"type": "single",
"hint": "",
"explanation": ".",
"content": "<p>3. The World Banks’ Doing Business Report 2018 was the fifteenth edition since its inception in 2003. Examine the following statements about the Report and select the correct answer using the codes given below.</p>\n<p>I. Doing Business uses 11 indicator sets to measure aspects of business regulation that matter for entrepreneurship.</p>\n<p>II. India is one of the 10 economies that improved the most in the areas measured by Doing Business as per the 2018 Report.</p>\n<p>III. South Asia is the only region not represented in the top 50 ranking for ease of doing business.</p>\n",
"options": [
"(a) I, II and III are correct ",
"(b) Only I is correct ",
"(c) Only I and II are correct ",
"(d) Only III is correct "
],
"correct": "1",
"marks": 4,
"user_marks": 0,
"status": 0,
"marked": null,
"auto": 1
},
Please help.Any help is really appreciated thank you.
