Skip to content
Discussion options

You must be logged in to vote

Hi @jasminder,
The issue you are facing is related to handling special characters like single quotes in Firebase import. To resolve this issue, you can escape the single quotes using backslashes () before importing the data into Firebase.

For example, if you have a value like 5' 11'', you can escape the single quotes like 5' 11'' before importing it into Firebase.

Here's an example of how you can handle this in a JavaScript GCP Cloud Function:

const admin = require('firebase-admin');
admin.initializeApp();

exports.importData = async (req, res) => {
  const data = {
    valueWithSingleQuotes: "5\\' 11\\'\\'",
    // Other data fields
  };

  try {
    await admin.firestore().collection('y…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Chadha93
Comment options

Answer selected by Chadha93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants