After fetching a JSON object from an API, I am currently going through the result set and constructing a ticket object. Here is the link to the JSON data:
data.ticket.seating.forEach((seat: any) => {
this.listings.push({ section: seat.section, selling: data.price.selling, amount: data.ticket.amount, type: data.ticket.type, row: seat.row });
this.barChartLabels.push(data.price.selling);
this.barChartData[0].data.push() // how to push the count of tickets which has the same price.
});
How can I determine the number of tickets with the same price in the code snippet above? Additionally, how can I identify the maximum price among all tickets?