First, let's assemble the data. Say we have two sets of objects: Fruits and Vegetables.
Our sections array would look like this. Note how each section has a data
attribute, which is an array of our fruits or vegetables.:
const sections = [
{
title: 'Vegetables',
key: 'vegetables',
data: [