Javascript – How to split/create an array on repeated duplicated key
const test = [{a:1},{b:2},{c:3},{d:4},{a:5},{b:6},{c:7},{a:8},{c:9}] Need output like below, On repeat of key "a", need to create new array till the same key repeat [{a:1},{b:2},{c:3},{d:4}] [{a:5},{b:6},{c:7}] [{a:8},{c:9}]