Last active
February 2, 2018 17:12
-
-
Save plushevy/a00c5dd7a2dcd6811178821c4e51cb6d to your computer and use it in GitHub Desktop.
$ Если не массив, обьект в массив.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (!$.isArray(json.data)) { | |
| json.data = [json.data]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment