Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
<script src="https://unpkg.com/@reactivex/rxjs@5.0.0-beta.7/dist/global/Rx.umd.js"></script>
</body>
</html>
 
Rx.Observable.of(
  {
    rows: [
      {row:0, col:0, value:'A'},
      {row:0, col:1, value:'B'},
      {row:0, col:2, value:'C'}
    ]
  },
  {
    rows: [
      {row:0, col:0, value:'A'},
      {row:0, col:1, value:'B'},
      {row:0, col:2, value:'C'}
    ]
  },
  {
    rows: [
      {row:0, col:0, value:'A'},
      {row:0, col:1, value:'B_changed'},
      {row:0, col:2, value:'C'}
    ]
  }
)
.distinctUntilChanged( null, x => {
  return x.rows.length + "_" + x.rows.reduce( (acc, v) => {
        acc.push(v.value);
        return acc;
    }, []).join("_");
})
.subscribe(x => console.log(x));
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers