I'm using react-router 2.7.0. In my route configuration there are nested routes each with their own parameter of the same name. E.g. /route1/:entityId which has a nested route of /route2/:entityId. The params and routeParams props supplied by react-router supply these values to both content components as an array. I.e. the path /route1/43/route2/56 will give the array [43,56] as the value for the entityId param.
This seems counter intuitive, I'd expect the routeParams provided to route1's component would be 43 and route2's to be 56, but instead I get the array of two elements to both components.
How do I determine which element in the array is for each component? Note: I cannot just use the index as my routing is built up from metadata, so there might be other routes nested in between route1 and route2 and each route is unaware of the other routes it's nested inside of. So there could potentially be 5 routes in play and route1 and route2 could be at any index 0-4