Query help please

{
“id”: 1,
“attributes”: {
“name”: "Nicoleta Super Earrings ",
“slug”: “nicoleta-super-earrings”,
“short_description”: “long dainty crystal earrings,earrings for brides or bridesmaids, CZ bridal earrings, Floral CZ wedding, Gift idea”,
“long_description”: “Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum\n\nHandmade item\nDispatches from a small business in United Kingdom\nMaterials: Copper\nLocation: Earlobe\nClosure: Push back\nMade to Order”,
“price”: 40,
“sale_price”: null,
“onSale”: false,
“new”: false,
“stock”: 11,
“createdAt”: “2022-08-15T10:00:29.071Z”,
“updatedAt”: “2022-08-15T16:46:30.015Z”,
“publishedAt”: “2022-08-15T10:00:47.588Z”,
“saleUntil”: null,
“category”: [
{
“id”: 4,
“name”: “Earrings”,
“slug”: “earrings”
}
],
}
} can someone pls help, Say my response is an array of these objects. How the hell do I write I query so I can pull products based on category.name … Tried everything from docs, tried a bunch of variations (http://localhost:1337/api/products?populate=[category][name]=Earrings) still cant get it to work … for example i want to pass category.name = earrings and only products under that category to show up. category is a reusable component btw. Also i couldnt find in the docs query examples when it comes to reusable components…really stuck here