Iterate through Super Table field in plugin I have a Super Table field with two columns, one is a category field, the other an assets field (limit 1 on both). How can I iterate through it to get the category and asset selected for each row in the table?

$superTable = $entry-&gt;colors;
foreach ($superTable as $row) {
    // Category field handle is `color`
    // Asset field handle is `image`

    // I've tried various things here, but I don't understand how to get the fields
    // I'm looking for the category ID and asset ID in every row of the table
}
Assuming your Super Table field has a handle of colors, you should be able to do:

foreach ($entry-&gt;colors as $block) {
    // Color will return a category element query, so you can do:

    // Return a collection of all category ids
    Craft::dump($block-&gt;color-&gt;ids());

    // Get the first category
    Craft::dump($block-&gt;color-&gt;one());

    // Get all the categories in the field
    Craft::dump($block-&gt;color-&gt;all());
}