【发布时间】:2019-05-02 15:29:32
【问题描述】:
我想将 JSON 中的布尔值打印到表中,如果我直接访问状态字段,则会显示一个空值 这是一个json文件的例子:
{
'name':'client'
'status':true,
'method':'masterCard',
'amount':'1700',
}
jsx 文件:
const columns = [
{
title: "name",
dataIndex: "name",
key: "name",
width: "20%"
},
{
title: "status",
dataIndex: "status",
key: "status",
width: "20%"
},
{title: "Method Paiment",
dataIndex: "method",
key: "method",
width: "20%",
}]
【问题讨论】:
-
你的期望输出是什么
-
没有显示
-
你想从第二个 JSON 转换成第一个 JSON 吗?
标签: javascript json reactjs