The scenario is like this: in the data returned by the background, there is a field that specifies the type of array to be returned. If there is data, it is an array. If there is no data, it is an empty array. However, when it is online, it is found that the data returned by the background is null, resulting in the front-end program reporting an error and unable to go on. The background staff feel that this is reasonable. The reason is that there is data that is an array, and if there is data, it is deleted Return null, I am also convinced, this kind of return data type transformation has been more than once, what do you think of this matter???
If the interface document is very clear, you don't have to waste a lot of time, just follow the document.
On the one hand, according to the documents, on the other hand, it's better to deal with this kind of problem in the front end. Don't believe what kind of data the back end will transmit to you_ T。。。。 The get method in lodash is very practical