FOREACH func in DQL (loops in Bulk Upsert)

Another example of usage

{
  Block as var(func: type(A), first:1) {
    uid
    bkn as dgraph.type
    link @normalize {
      link2 {
        J as uid
      }
    }
  }
  _foreach(func: uid(Block), blockname: val(bkn) ){
     uid #show my uid from the "Block" var
    count: (func: uid(J)){ # This is just an example
    count(uid)
  })
  }
}

The ideal Result

{
   "data": {
      "A": [
         {
            "uid": "0x1",
            "count": 2
         }
      ],
      "B": [
         {
            "uid": "0x2",
            "count": 4
         }
      ],
      "C": [
         {
            "uid": "0xa",
            "count": 6
         }
      ]
   },
   "extensions": {
      "server_latency": {
         "parsing_ns": 68608,
         "processing_ns": 1716618,
         "encoding_ns": 14078,
         "assign_timestamp_ns": 343783,
         "total_ns": 2205808
      },
      "txn": {
         "start_ts": 61
      },
      "metrics": {
         "num_uids": {
            "": 0,
            "dgraph.type": 0,
            "link": 1,
            "link2": 5,
            "uid": 3
         }
      }
   }
}