I am trying to create a component using react-native from below JSON format. And this has to be done with-out using any third party components.
- {
- "properties": {
- "taxDetails": {
- "type": "array",
- "items": {
- "properties": {
- "keyValue": {
- "type": "string"
- },
- "keyName": {
- "type": "string"
- },
- "index": {
- "type": "number"
- }
- }
- }
- },
- "upperBody": {
- "type": "array",
- "items": {
- "properties": {
- "keyValue": {
- "type": "string"
- },
- "keyName": {
- "type": "string"
- },
- "index": {
- "type": "number"
- }
- }
- }
- },
- "bodyItems": {
- "type": "object",
- "properties": {
- "itemDetails": {
- "type": "array",
- "items": {
- "properties": {
- "ItemValue": {
- "type": "string"
- },
- "ItemPrice": {
- "type": "string"
- },
- "ItemQty": {
- "type": "string"
- },
- "ItemName": {
- "type": "string"
- }
- }
- }
- },
- "itemCount": {
- "type": "string"
- }
- }
- },
- "paymentDetails": {
- "type": "object",
- "properties": {
- "paymentMeta": {
- "type": "array",
- "items": {
- "properties": {
- "keyValue": {
- "type": "string"
- },
- "keyName": {
- "type": "string"
- },
- "index": {
- "type": "number"
- }
- }
- }
- },
- "paymentType": {
- "type": "string"
- }
- }
- }
- }
- },
- }
-
{item.keyName} -
{item.keyValue} -
{item.index} -
{item.ItemName} -
{item.ItemPrice} -
{item.ItemQty} -
{item.ItemValue}
If I create a template like that, I can show the values by using other JSON. So can someone please help me in creating a template like above.
Kiran MohantyPosted Jan 11, 2021, 10:55 AM