$db = JFactory::getDbo();
		$uri =JURI::getInstance();
		$url= $uri->root();
$post=JRequest::get('post');

//$post['procedureid']=2;
		
		$imaga_path=$url.'components/com_naderapp/assets/procedurecat_image/';
		
	$query='SELECT * FROM #__naderapp_procedurecat WHERE published=1 AND pro_id='.$post['procedureid'];
		$db->setQuery($query); 
		$parents=$db->loadObjectList();


		
		
		$procedure=array();
		
	if($parents)
	{	
		
		for($i=0;$i<count($parents);$i++)
		{
			$row=$parents[$i];
			
			$procedurearray=array();
				
			$procedurearray['id']=$parents[$i]->id;
			$procedurearray['imagename']=$parents[$i]->procedurecatname;
			$procedurearray['image']=$imaga_path."thumb_".$parents[$i]->cat_image;
			
			$procedure[]=$procedurearray;
		}
		
		
		
		 $arr = array('success' => '1','procedure' => $procedure);
   		 echo json_encode($arr);exit;
		
	}
	else
	{
		
		  $arr = array('success' => '0','procedure' => 'No Record Found');
 		  echo json_encode($arr);exit;
		
	}