For the problem of array splitting, ask for advice.

an array
arr = [{"id": 1393, "sort": 3}, {"id": 1395, "sort": 4}, {"id": 1397, "sort": 5}]
split into two arrays
arr1 = [{"id": 1393, "sort": 3}, {"id": 1397, "sort": 5}] according to sort=4;

Mar.02,2021

arr1 = arr.filter ((elem,index) = > elem.sort! = 4)
arr2 = arr.filter ((elem,index) = > elem.sort = = 4)

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eafa20-226f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eafa20-226f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?