Component as property of an object

System Information
  • Strapi Version: 3.3.0
  • Operating System: Mac
  • Database: sql-lite(quickstart)
  • Node Version: 14.15.0
  • NPM Version: 6.14.8
  • Yarn Version: 1.22.4

Hi all,

Similar to this issue I had about a week ago here
I’m having trouble populating a key value pair called “Actions” under activities. It’s nested as defaults => sections => contents => activities and then action being the key and an object being the value of an activity. This action field that I added to activities is a component type. It is my first time using components so forgive me if I’m missing something simple. I’ve tried adding "sections.contents.activities.components_method_action", "sections.contents.activities.components_method_action", and their plural variations to the populate array in ./api/default/services/default.js mentioned from my previous post here with no luck. I will mention that going to localhost:1337/activities does show the action property properly.

Expected Outcome
When hitting the endpoint, activities should have a key:value pair of action with the designated object as the value.

What part of your path is the component?

  • defaults
  • sections
  • contents
  • activities

The component would be under activities. It is called action and looks like
Screen Shot 2020-11-18 at 9.42.05 AM
so this image above is from localhost:1337/activities and the action shown is that activity.action