-3

hey guys I have the following sample data and I would like to parse it in php. Can you please direct me on how to get each value for "plate" and "confidence" in the candidate object in the data below.

$sample_data = [{"job_status": 3, "plates": {"data_type": "alpr_results", "epoch_time": 1430894595648, "img_height": 723, "img_width": 1280, "results": [{"plate": "RAC162R", "confidence": 90.876228, "region_confidence": 0, "region": "", "plate_index": 0, "processing_time_ms": 38.729237, "candidates": [{"matches_template": 0, "plate": "RAC162R", "confidence": 90.876228}], "img_height": 723, "img_width": 1280}]';

Thanks in advance

paul wall
  • 3
  • 2

1 Answers1

1

It is very simple, try to use json_decode($sample_data); Result is php array.

Kevin Nagurski
  • 1,889
  • 11
  • 24