diff --git a/packages/hoppscotch-app/components/collections/ImportExport.vue b/packages/hoppscotch-app/components/collections/ImportExport.vue
index 542336983..6ed7c0355 100644
--- a/packages/hoppscotch-app/components/collections/ImportExport.vue
+++ b/packages/hoppscotch-app/components/collections/ImportExport.vue
@@ -156,6 +156,7 @@
diff --git a/packages/hoppscotch-app/helpers/import-export/import/hopp.ts b/packages/hoppscotch-app/helpers/import-export/import/hopp.ts
index bd7877c06..66be98062 100644
--- a/packages/hoppscotch-app/helpers/import-export/import/hopp.ts
+++ b/packages/hoppscotch-app/helpers/import-export/import/hopp.ts
@@ -8,10 +8,13 @@ import {
translateToNewRESTCollection,
} from "~/newstore/collections"
-const importer: HoppImporter> = (content) =>
+const importer: HoppImporter[]> = (content) =>
pipe(
E.tryCatch(
- () => translateToNewRESTCollection(content),
+ () =>
+ JSON.parse(content).map((coll: any) =>
+ translateToNewRESTCollection(coll)
+ ),
() => IMPORTER_INVALID_FILE_FORMAT
),
TE.fromEither
diff --git a/packages/hoppscotch-app/helpers/import-export/import/index.ts b/packages/hoppscotch-app/helpers/import-export/import/index.ts
index 090c23f03..239d06052 100644
--- a/packages/hoppscotch-app/helpers/import-export/import/index.ts
+++ b/packages/hoppscotch-app/helpers/import-export/import/index.ts
@@ -30,7 +30,7 @@ export type HoppImporterDefintion = {
}
export const RESTCollectionImporters: HoppImporterDefintion<
- Collection
+ Collection[]
>[] = [
{
name: "Hoppscotch REST Collection",
diff --git a/packages/hoppscotch-app/locales/en.json b/packages/hoppscotch-app/locales/en.json
index 44ed5f82b..9efd1bbfc 100644
--- a/packages/hoppscotch-app/locales/en.json
+++ b/packages/hoppscotch-app/locales/en.json
@@ -236,7 +236,7 @@
"from_postman": "Import from Postman",
"from_url": "Import from URL",
"gist_url": "Enter Gist URL",
- "json": "Import from JSON",
+ "json": "Import from file",
"title": "Import"
},
"layout": {