title: Swift Combine - Observe property in object inside array of N objects and merge with other properties
body: <p>I'm building a graphics app for iOS. Here is my code.</p>
  
  <pre><code>class Group {
  
      /// All the shapes contained in the group
      public var shapes: CurrentValueSubject&lt;[Shape], Never&gt;
  
      /// The frame of the group
      var frame: CurrentValueSubject&lt;CGRect, Never&gt;
  
      /// The path to be calculated and displayed to users from the contained shapes
      var cgPath: CurrentValueSubject&lt;CGPath, Never&gt;
  }
  
  class Shape {
      var path: CurrentValueSubject&lt;Path, Never&gt;  = .init(Path())
  }
  
  struct Path {
      public var points = [CGPoint]()
  }
  </code></pre>
  
  <p>So, here is what I want to do but don't know how to do it with Combine. </p>
  
  <p>I want <code>Group</code> to observe it's own <code>frame</code>, <code>shapes</code>, and the <code>path</code> of it's shapes (I need to merge all this), so every time each of they change, I can calculate the new CGPath to display and assign it to the <code>cgPath</code> property (which will be observed by the View that draws everything).</p>
  
  <p>Please, let me know if this is possible or if there is a better approach to all this.</p>
  
  <p>Thanks in advance.</p>