title: How to extract fields from nested fields using Marshmallow
body: <p>I have a scenario where in I have to extract fields from a event receiving from kinesis as dictionary.I have to extract schema from the dictionary which looks like below:</p>
  <pre><code>{
   'rec_id': 'com-website',
   'etl_tstamp': '2021-12-10T18:46:15.011Z',
   'collector_tstamp': '2021-12-10T18:46:14.630Z',
   'dvce_created_tstamp': '2021-12-10T18:46:14.547Z',
   'event_id': 'b440631d-a73c-41d4-92fc-02f96ecd3cd6',
   'v_tracker': 'js-2.17.3',
   'v_collector': 'ssc-0.15.0-kinesis',
   'page_url': 'https://www.test-server.com',
   'contexts_content_1': [{'type': 'article',
     'contentId': 'O7EWQO7SS5ASFPZL5RECPV6ZSU',
     'writer': 'Tim',
     'accessCategory': 'free access',
     'contentSize': 169}],
   'contexts_page_1': [{'type': 'website',
     'pageId': 'O7EPZL5PV6ZSU',
     'url': 'https://www.test-server.com'}]
  }
  </code></pre>
  <p>I want to extract the fields rec_id,contentId and if url matched with page_url then is_Url_Matched as True else false.Output would look like this:</p>
  <pre><code>{
   'rec_id': 'com-website',
   'contentId': 'O7EWQO7SS5ASFPZL5RECPV6ZSU',
   'writer': 'Tim',
   'is_Url_Matched': True
  }
  </code></pre>
  <p>How to extract the nested fields rec_id is possible to serialize nested fields?</p>
  <p>I have tried this but its not working:</p>
  <pre><code>from marshmallow import Schema, fields
  
  dicts = {
   'rec_id': 'com-website',
   'etl_tstamp': '2021-12-10T18:46:15.011Z',
   'collector_tstamp': '2021-12-10T18:46:14.630Z',
   'dvce_created_tstamp': '2021-12-10T18:46:14.547Z',
   'event_id': 'b440631d-a73c-41d4-92fc-02f96ecd3cd6',
   'v_tracker': 'js-2.17.3',
   'v_collector': 'ssc-0.15.0-kinesis',
   'page_url': 'https://www.test-server.com',
   'contexts_content_1': [{'type': 'article',
     'contentId': 'O7EWQO7SS5ASFPZL5RECPV6ZSU',
     'writer': 'Tim',
     'accessCategory': 'free access',
     'contentSize': 169}],
   'contexts_page_1': [{'type': 'website',
     'pageId': 'O7EPZL5PV6ZSU',
     'url': 'https://www.test-server.com'}]
  }
  
  class ChildSchema(Schema):
      contentId = fields.Str()
      url = fields.Str()
      writer = fields.Str()
  #     class Meta:
  #         fields = ('contentId','writer','url' )
          
  class UserSchema(Schema):
      rec_id = fields.Str()
      contentId = fields.Pluck(ChildSchema,'contexts_content_1', attribute='contentId', many=True)
      writer = fields.Pluck(ChildSchema,'contexts_content_1', attribute='writer', many=True)
      page_url = fields.Str()
      contexts_page_1 = fields.Pluck(ChildSchema, 'url', many=True)
      
  UserSchema().dumps(dicts)
  </code></pre>