考虑这个 JSON 对象,它可以用作 HTML 中选择元素的选项数据:
{"dropdown_options" : [
{"id" : "received", "title" : "Received", "value" : "received"},
{"id" : "approved", "title" : "Approved", "value" : "approved"},
{"id" : "rejected", "title" : "Rejected", "value" : "rejected"}
]}
如何重用上述 JSON 对象来定义另一个 JSON 对象?
像这样的东西:
{"select" : {"id" : "message_carriers", "options" : "dropdown_options"}}
编辑:上面的代码示例是 .json 文件的一部分。