-1

I have a PHP object that print_r's with this result

 fieldData: {},
portalData: {
    SubCategories: {
        0: {},
        1: {
            recordId: "3",
            SubCategories::SubCategoryName: "Multi-Channel",
            modId: "0"
    },
        2: {},
        3: {}
    }
},
recordId: "2",
modId: "3"

How do I access the SubCategoryName?

Jason Osei
  • 19
  • 1

1 Answers1

2

You should be able to access it using:

$object->portalData->SubCategories->{1}->{'SubCategories::SubCategoryName'} 

– Magnus Eriksson 2 mins ago

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
Jason Osei
  • 19
  • 1