Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8008667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:12:35+00:00 2026-06-04T18:12:35+00:00

Or…complex to me is maybe more accurate. In any case, I have mongod and

  • 0

Or…”complex to me” is maybe more accurate.

In any case, I have mongod and mongo open and in the mongo terminal I put in the following command:

db.err_details.insert({"error_text" : "Log has found error on inbound", "co
de" : "WM2001_0", "product" : "WM2001", "profile : ["CR" : "11999002", "sol
s" : ["run", "to", "the", "hills"]], "otherinfo" : "Contact Bob Saget"});

err_details DOES exist, not that that matters. In any case, I press enter and it gives me “…” twice then just quits without inserting. It has done this before when there is a syntax error in a query…yet it does not tell you where the error is or what is wrong, and, golly, I just can’t find it this time.

In case the intention is unclear, I want “profile” to have an array of key-value pairs, one of which (“sols”) has ITS OWN array just values, not key-value pairs.

In light of the fact “profile” is an object I tried the following:

db.err_details.insert({"error_text" : "Log has found error on inbound", "errco
de" : "WM2001_0", "product" : "WM2001", "profile" : {"CR" : "11999002", "sols" :
["run", "to", "the", "hills"]}, "otherinfo" : "Contact Bob Saget"});

This is valid mongo but I want an array of objects rather than an object containing an element with an array.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:12:37+00:00Added an answer on June 4, 2026 at 6:12 pm

    There’s a syntax error. Your value for “profile” property seems to be an object, but you use array’s []. And one of quote around profile is missing too.

    (Hint: just copy/paste your command to any JS checking service, since that’s what Mongo console uses. Editors with on-the-fly error highlighting will do exceptionally well).

    I don’t quite understand your DB’s structure, but “array of k/v pairs” should be something along those lines:

    db.err_details.insert({
        "error_text" : "Log has found error on inbound",
        "code" : "WM2001_0",
        "product" : "WM2001",
        "profile" : [
            {"CR" : "11999002"},
            {"sols" : ["run", "to", "the", "hills"]}
        ],
        "otherinfo" : "Contact Bob Saget"
    });
    

    i.e. – with every pair wrapped up in object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an element like this: <span class=tool_tip title=The full title>The ful&#8230;</span> This seems
I have this xml <entry id=1008 section=articles> <excerpt><p>&#8230; in Richtung „Aus für Tierversuche. Kosmetik-Fertigprodukte
I want to open a popup window of an Image on More Info link
so I did $subject = 'sakdlfjsalfdjslfad <a href=something/8230>lol is that true?</a> lalalala'; $subject =
I have been making a wordpress template. i got stuck at some place... the
Why does the Android system throw this Exception? 05-18 12:33:44.169 W/System.err( 8230): java.io.IOException: Is
I see that some rss on xml have strange strings. For example, ... is
I have a form, one of the fields is a select field, with 5
I have a PDB file. Now it has two parts separated by TER. Before
CGI.escapeHTML is pretty bad, but CGI.unescapeHTML is completely borked. For example: require 'cgi' CGI.unescapeHTML('&#8230;')

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.