'i have JavaScript associative array name 'options'
<script>
options[dynamickey] = Number;
</script>
and i just want to send this array to codeigniter model using jQuery post
<script>
$.('link',options);
</script>
But the problem is I don't know how to extract each of the keys and values of this array (options). My JavaScript array with data looks like this
<script>
options {
id => 135,
'Chestnut' => 11,
'Cinamon' => 1
}
</script>
in codeigniter (PHP) model i just wanna extract this array like this
<?php
$id = $this->input->post('id');
//below variable names and data should be dynamic from that javascript array
$chesnut= $this->input->post('dynamic value');
?>
Please help me to solve this.