How can I check if a value is a json object?

后端 未结 13 1430
-上瘾入骨i
-上瘾入骨i 2020-11-30 23:33

My server side code returns a value which is a json object on success and a string \'false\' on failure. Now how can I check whether the returned value is a json object?

相关标签:
13条回答
  • 2020-12-01 00:04

    i tried all of the suggested answers, nothing worked for me, so i had to use

    jQuery.isEmptyObject()
    

    hoe that helps someone else out with this issue

    0 讨论(0)
提交回复
热议问题