javascript - How to take out the key value whose key value is true in object, and then join(',')
漂亮男人2017-06-26 10:53:52
0
2
876
How to take out the key value in the object whose key value is true, and then join(','). The current data structure is, , send_message:{1: true,2:true}, the data structure I want to give to the background is: send_message=1,2&is_live=1
Use for...in...:
This way: