Convert JSON array in MySQL to rows
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm loving the new JSON functions in MySQL 5.7, but running into a block trying to merge values from JSON into a normal table structure. Grabbing JSON, manipulating and extracting arrays from it etc. is simple. JSON_EXTRACT all the way. But what about the inverse, going from a JSON array to rows? Perhaps I am dense on the existing MySQL JSON functionality, but I haven't been able to figure that one out. For example, say I have a JSON array and want to insert a row for each element in the array with its value? The only way I have found is to