This is a tough one... I have an array like
[{'city':'LA','store':'Bobs Burgers'},{'city':'LA','store':'Burger King'},{'city':'Sacramento','store':'Jimmy Burger'}]
If I am looping through these burger places in a table and I want to add in a row when the city changes, how do I do that?
In PHP I would do
<?php
foreach ($store in $burgerplaces){
if ($store['city']!=$prev_city){
# show header for the city
}
#print store info
$prev_city=$store['city'];
}
?>