How to iterate through JSON hash with coffeescript

后端 未结 2 1893
有刺的猬
有刺的猬 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:13

    for key, value of result
      console.log "#{key} and #{value}"
    

    more in the docs#loops

提交回复
热议问题