I made my first plugin I don't deal allot with variable and parsing. it was a JSON data to pars to a template. the problem is when I decode the JSON to an array Then I use parse the variables to the template I can't get the variables in my plugin tag. I found a question similar to my question but it did work for me either .
can i get help please :D
public function __construct()
{
$this->EE =& get_instance();
$find = array("<", ">");
$rep = array("{", "}");
$json = str_replace($find, $rep, $this->EE->TMPL->fetch_param('json'));
$json = current(json_decode($json,true));
$json['location'] = array(
array('lat'=>$json['location']['lat'],'lng'=>$json['location']['lng'])
);
$json['social'] = array(
array('twitter'=>$json['social']['twitter'],'facebook'=>$json['social']['facebook'],'LinkedIn'=>$json['social']['LinkedIn'])
);
$vars = (array) array($json);
$this->return_data = $this->EE->TMPL->parse_variables($this->EE->TMPL->tagdata, $vars);
}