cancel
Showing results for 
Search instead for 
Did you mean: 

Array Child

butchukoybit
Deputy Chef I
Deputy Chef I

I have this result in one of my step.

{
  ID: 43039,
  Group ID: 34,
  Default billing: 148093,
  Default shipping: 148093,
  Created at: 2025-11-11T03:08:51.000000-08:00,
  Updated at: 2025-11-11T03:08:51.000000-08:00,
  Created in: Huskee AU Store View,
  Email: rojohnniel+bitau3@huskee.co,
  First name: bitau3,
  Last name: bitau3,
  Store ID: 27,
  Website ID: 87,
  Addresses: 
[],
  Disable auto group change: 0,
  Extension attributes: 
{},
  Custom attributes: 
[
     
{
      attribute_code: inherit_restrict_sublogins,
      value: 0
    },
     
{
      attribute_code: payment_terms,
      value: 298
    },
     
{
      attribute_code: password_reset_sent_count,
      value: 0
    },
     
{
      attribute_code: business_type,
      value: 442
    },
     
{
      attribute_code: is_news_letter_subscribed,
      value: 0
    },
     
{
      attribute_code: is_privacy_policy_subscribed,
      value: 0
    },
     
{
      attribute_code: customer_lead,
      value: direct
    }
  ]
}

 

I want to get the value of business_type

So far this is what I have

 

=_dp('{"pill_type":"output","provider":"magento","line":"get_customer_by_ID_2","path":["custom_attributes"]}').pluck('attribute_code').pluck('business_type')

 

2 REPLIES 2

butchukoybit
Deputy Chef I
Deputy Chef I

thi is what i have done. it works for now. do you have any suggestion to improve?

=_dp('{"pill_type":"output","provider":"magento","line":"get_customer_by_ID_2","path":["custom_attributes"]}').where(attribute_code: "business_type").pluck('value').join

Hello @butchukoybit ,
This is thealmost the way of doing it, just a small suggestion, instead of join use smart_join, this way you won't get any null values.