我想根据我的请求过滤json数据。因此,如果我的请求像/user
一样,它会给我完整的json数据作为结果,如果我给/user?bikes
,它会为我过滤带有json结果和自行车数据的结果,如果我使用/user?cars
结果用汽车过滤了json数据。以下是我的JSON有效负载。
{
"name": "John",
"age": 30,
"cars": {
"car1": "Ford",
"car2": "BMW",
"car3": "Fiat"
},
"bikes": {
"bike1": "ducati",
"bike2": "BMW",
"bike3": "honda"
}
}
所以/user
将提供完整数据
/user?bikes
将为-
{
"bikes": {
"bike1": "ducati",
"bike2": "BMW",
"bike3": "honda"
}
}
/user?cars
将为-
{
"cars": {
"car1": "Ford",
"car2": "BMW",
"car3": "Fiat"
}
}
请让我知道如何使用mulesoft来使用它