I have a javascript array and I need to detect the name in the javascript and then insert immediately after that item in the array. Prefer jQuery and javascript for solution.
var arrayExample =
[{"name":"Test1","id":[1]},
{"name":"Test2","id":[2]},
{"name":"Test3","id":[3]},
{"name":"Test4","id":[4]},
{"name":"Test5","id":[5]}];
I want to detect "Test3" and then insert this new array: {"name":"Test3.0001", "id":[3,6]}.
Using this technique but would like to add a function that detects the name and automatically splieces in or pushes in the new array using jQuery.