I have an array, which I send with ajax to my controller for make some actions on it. It looks like this:
jQuery:
var url = window.location.pathname.split('/');
segments = [];
segments.push( url[3], url[4], url[5] );
$.ajax({
'data': { array : JSON.stringify(segments) },
});
And then, when I get it in my controller, I have an array with 1 element: key - "segments" and value with all values of an array segments.
What can be done for parse the array with 1 element into a new array with a few elements.
Thanks for attention and help
segments = {part3: url[3], part4:url[4], part5:url[5]};?