Apr 13, 2020
0
Level 13
How to compare two json data using php one is xml other one is mysql?
I do have two json multidimensional array one is from database and other is from my public path it comes as xml, How do i compare both data are same or not?
one data coming from database,
$shipment = Shipment::take('10')->get()->toJson();
$ship = json_decode($shipment,TRUE);
I do have two json multidimensional array one is from database and other is from my public path it comes as xml, How do i compare both data are same or not?
one data coming from database,
$shipment = Shipment::take('10')->get()->toJson();
$ship = json_decode($shipment,TRUE);
other data coming from local storage that is xml files,
$files = File::get(storage_path('xml\Last_FILSDCSEA.xml'));
$xml = simplexml_load_string($files, "SimpleXMLElement", LIBXML_NOCDATA);
$json = json_encode($xml);
//dd($json);
$data = json_decode($json,TRUE);
any changes have to made over this code please help?
Please or to participate in this conversation.