Question: I want to group the array of objects based on the key and concat all the grouped objects into a single array. GroupBy based on the id

example,

**payload**

```
[
  {
    id: 1,
    name: 'a'
  },
  {
    id: 1,
    name: 'b'
  },
  {
    id: 1,
    name: 'c'
  },
  {
    id: 2,
    name: 'b'
  },
  {
    id: 2,
    name: 'c'
  }
]

```

**expected response**

```
[
  [
    {
      id: 1,
      name: 'a'
    },
    {
      id: 1,
      name: 'b'
    },
    {
      id: 1,
      name: 'c'
    }
  ],
  [
    {
      id: 2,
      name: 'b'
    },
    {
      id: 2,
      name: 'c'
    }
  ]
]

```

All the matched elements are in the same array and all the arrays should be in a single array.

Answer: 
I was able to solve it (after a few days of suffering) using [precompiled Boost 1.74](https://sourceforge.net/projects/boost/files/boost-binaries/1.74.0/boost_1_74_0-msvc-14.1-64.exe/download) and by changing the boost/python related parts of cv\_bridge/CMakeLists.txt to:

```
...
set(BOOST_ROOT <your/path/to/boost_1_74_0>)

find_package (Python3 REQUIRED COMPONENTS Interpreter Development)
if(NOT ANDROID)
    find_package(Boost QUIET)
    if(Boost_VERSION LESS 106500)
        find_package(Boost REQUIRED python)
    else()
        # This is a bit of a hack to suppress a warning
        #   No header defined for python3; skipping header check
        # Which should only affect Boost versions < 1.67
        # Resolution for newer versions:
        #  https://gitlab.kitware.com/cmake/cmake/issues/16391
        if (Boost_VERSION LESS 106700)
            set(_Boost_PYTHON3_HEADERS "boost/python.hpp")
        endif()
        find_package(Boost COMPONENTS python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} REQUIRED)
    endif()
else()
    find_package(Boost REQUIRED)
endif()
find_package(sensor_msgs REQUIRED)
...

```

Do not forget to remove build and install folders before triggering colcon build again.
I had the same problem. I tried to give the lib and include folders explicitly to cmake, so as the library itself and I also tried to rename libboost\_python37-vc143-mt-x64-1\_78.lib to libboost\_python3.lib but non of these worked.

What worked was to simply providing the root to cmake:

```
cmake -DBOOST_ROOT=C:\\Boost ..

```

in my case `C:\\Boost` contains the `lib` and `ìnclude` folders that I created using:

```
.\b2 --with-python -j16 --prefix=C:\Boost --libdir=C:\Boost\lib --includedir=C:\Boost\include install

```