[CXX-1995] Standard string from bson to son to look up the specific value Created: 15/Apr/20 Updated: 27/Oct/23 Resolved: 24/Aug/20 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | 莫 莫 | Assignee: | Samantha Ritter (Inactive) |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Hello dear MongoDB guys, I can visit a mongodb data-base in remote server, get the data-base and correponding collection. I filter kip with the specific ids, the information can be displayed as the standard string, however, it cannot be queried with the interested keys to get the data-list. My code is:
As I know, the jsoncpp and other corresponding C++ library can only parse the string with the backslash between double-quote. With standard string as input, I cannot get the "root["keyboard"].asString()". Is there any solution to resolve this? The returned value of bsoncxx and mongocxx API can be queried by jsoncpp. |
| Comments |
| Comment by Samantha Ritter (Inactive) [ 22/Jul/20 ] | |||||||||
|
Thank you for opening this ticket! Are you able to provide the structure of the documents you are using? I'm guessing that they have a field called "keyboard" with a string value, like this:
I think that you are asking about how to access the value of the "keyboard" field. Here's how to do that:
Does that help? Thanks, |