开发者

How to display key-value pair of an object recursively

Let's say I have an object:

{
  "id": 64,
  "priceValue": {
    &q开发者_如何转开发uot;afterData": 33,
    "beforeData": null
  }
}

How I can display it (using html, css/scss, react) on the web in this format:

id: 64
priceValue:
    afterData: 33
    beforeData: null

The requirement is children key-value must be indented to their parent and it can display deeply nested key-value pairs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜