def extract_embedded_attributes(attributes)
      atomic_position.split(".").inject(attributes) do |attrs, part|
        attrs = attrs[part =~ /\d/ ? part.to_i : part]
        attrs
      end
    end
def extract_embedded_attributes(attributes)
      atomic_position.split(".").inject(attributes) do |attrs, part|
        attrs = attrs[part =~ /\d/ ? part.to_i : part]
        attrs
      end
    end
Extract only the desired embedded document from the attributes.

 @example Extract the embedded document.
   document.extract_embedded_attributes(attributes)

 @param [ Hash ] attributes The document in the db.

 @return [ Hash ] The document's extracted attributes.

 @since 2.3.2