Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregate calls forcing [] bracket wrapping on the response. This unfortunately interferes with some 3rd party charting libraries. #1633

Open
robertgardunia opened this issue Mar 5, 2024 · 0 comments

Comments

@robertgardunia
Copy link

My aggregate call is returning an array:

[
{
"data" : [
{
"name": "Statements",
"data": [
4
]
}
],
"category": [
"Abandoned"
]
}
]

Instead of an object:
{
"data" : [
{
"name": "Statements",
"data": [
4
]
}
],
"category": [
"Abandoned"
]
}

I can test with the absolutely simplest aggregate call and I still get the brackets. This seems to be 'built in' to the aggregate API in Learning Locker. Is there way to flag this so that it returns an object when we know it's a single item and not an array? We are doing a call from a 3rd party charting plug-in so there's no easy way to manipulate the response before it gets consumed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant