How to iterate through JSON hash with coffeescript

后端 未结 2 1888
有刺的猬
有刺的猬 2021-02-18 23:35

I\'m new to Coffeescript and I\'m having issues resolving an issue. I have a JSON object that is currently stored in a variable. How do I iterate through the keys in the JSON ob

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-19 00:20

    result = JSON.parse client
         for c in result
            console.log(c.key +"-"+ c.value)
    

    it's work!

提交回复
热议问题