In my Java script I'm create array and now I'm converting to Json Object using stringify method.
<script type="text/javascript">
var array1 = new Array();
$.ajax({
url : "Result",
type : 'POST',
data : {
"array1" : JSON.stringify(array1),
"globalClassId" : globalClassId
}});
</script>
But in server side array1 parameter creating like ["1","2","3"] But we don't want extra bracket []
How to Remove this extra bracket?
If we remove this extra [] the code look like "1","2","3" ,
we can simple loop it.
array1.join()instead ofJSON.stringify(array1)