Related
I use the #pnp/sp library to get list data in a SPFX web part.
The crucial code for my issue looks as follows:
const list = await sp.web.lists
.getByTitle("ListTitle")
.fields.getByTitle("Category")
.get();
return list.Choices.results;
When I open the SharePoint page, where the web part is located, in view mode, it loads the correct object:
{
"__metadata": {
"id": "...",
"uri": "...",
"type": "SP.FieldChoice"
},
"DescriptionResource": {
"__deferred": {
"uri": "..."
}
},
"TitleResource": {
"__deferred": {
"uri": "..."
}
},
"AutoIndexed": false,
"CanBeDeleted": true,
"ClientSideComponentId": "00000000-0000-0000-0000-000000000000",
"ClientSideComponentProperties": null,
"ClientValidationFormula": null,
"ClientValidationMessage": null,
"CustomFormatter": null,
"DefaultFormula": null,
"DefaultValue": "SocialEvent",
"Description": "",
"Direction": "none",
"EnforceUniqueValues": false,
"EntityPropertyName": "...",
"Filterable": true,
"FromBaseType": false,
"Group": "Benutzerdefinierte Spalten",
"Hidden": false,
"Id": "...",
"Indexed": false,
"IndexStatus": 0,
"InternalName": "...",
"IsModern": false,
"JSLink": "clienttemplates.js",
"PinnedToFiltersPane": false,
"ReadOnlyField": false,
"Required": true,
"SchemaXml": "<Field Type=\"Choice\" DisplayName=\"Category\" Required=\"TRUE\" EnforceUniqueValues=\"FALSE\" Indexed=\"FALSE\" Format=\"Dropdown\" FillInChoice=\"FALSE\" ID=\"{...}\" SourceID=\"{{listid:...}}\" StaticName=\"...\" Name=\"...\" ColName=\"nvarchar4\" RowOrdinal=\"0\" CustomFormatter=\"\" Version=\"2\"><Default>SocialEvent</Default><CHOICES><CHOICE>SocialEvent</CHOICE><CHOICE>Schulung</CHOICE><CHOICE>Fachbesprechung</CHOICE><CHOICE>Messe</CHOICE></CHOICES></Field>",
"Scope": "/sites/.../Lists/...",
"Sealed": false,
"ShowInFiltersPane": 0,
"Sortable": true,
"StaticName": "...",
"Title": "Category",
"FieldTypeKind": 6,
"TypeAsString": "Choice",
"TypeDisplayName": "Auswahl",
"TypeShortDescription": "Auswahl (MenĂ¼)",
"ValidationFormula": null,
"ValidationMessage": null,
"FillInChoice": false,
"Mappings": null,
"Choices": {
"__metadata": {
"type": "Collection(Edm.String)"
},
"results": [
"SocialEvent",
"Schulung",
"Fachbesprechung",
"Messe"
]
},
"EditFormat": 0
}
But when I change the mode to edit, the same code gives me the following result (I shortened it, because the result is 10.000+ lines):
{
"user": {
"#odata.context": "...",
"#odata.type": "#SP.User",
"#odata.id": "...",
"#odata.editLink": "Web/GetUserById(17)",
"Id": 17,
"IsHiddenInUI": false,
"LoginName": "...",
"Title": "...",
"PrincipalType": 1,
"Email": "...",
"Expiration": "",
"IsEmailAuthenticationGuestUser": false,
"IsShareByEmailGuestUser": false,
"IsSiteAdmin": true,
"UserId": {
"NameId": "...",
"NameIdIssuer": "urn:federation:microsoftonline"
},
"UserPrincipalName": "..."
},
"item": {
"#odata.context": "...",
"#odata.type": "#SP.Data.SitePagesItem",
"#odata.id": "...",
"#odata.etag": "\"363\"",
"#odata.editLink": "...",
"FileSystemObjectType": 0,
"Id": 1,
"ContentTypeId": "...",
"OData__ModerationComments": null,
"ComplianceAssetId": null,
"Title": "Homepage",
"PageLayoutType": "Home",
"BannerImageUrl": {
"Description": "...",
"Url": "..."
},
"Description": "...",
"PromotedState": 0,
"FirstPublishedDate": null,
"LayoutWebpartsContent": null,
"OData__AuthorBylineId": null,
"OData__TopicHeader": null,
"OData__SPSitePageFlags": null,
"OData__SPCallToAction": null,
"OData__OriginalSourceUrl": null,
"OData__OriginalSourceSiteId": null,
"OData__OriginalSourceWebId": null,
"OData__OriginalSourceListId": null,
"OData__OriginalSourceItemId": null,
"ID": 1,
"Created": "2022-07-30T16:11:23-07:00",
"AuthorId": 0,
"Modified": "2022-09-28T00:45:46-07:00",
"EditorId": 0,
"OData__ModerationStatus": 3,
"CheckoutUserId": 0,
"UniqueId": "...",
"owshiddenversion": 363,
"OData__UIVersionString": "41.5",
"GUID": "..."
},
"itemProperties": {}
...
}
The following versions are installed:
"#pnp/common": "1.3.9",
"#pnp/logging": "1.3.9",
"#pnp/odata": "1.3.9",
"#pnp/sp": "1.3.9",
Update:
I installed the web part in different site collections within the tenant, which resulted in the same error. Now I have installed the web part in another tenant, where the problem don't occur. Unfortunately, I still cannot determine where the error is.
Here is how I'm initializing the Checkout Process in Node.js.
let email = req.body.email
let product_id = req.body.product_id
let YOUR_DOMAIN = 'http://localhost:8000'
const session = await stripe.checkout.sessions.create({
line_items: [{
price: product_id,
adjustable_quantity: {
enabled: true,
minimum: 1,
maximum: 5,
},
quantity: 1,
}],
customer_email: email,
mode: 'payment',
success_url: `${YOUR_DOMAIN}/payment-success`,
cancel_url: `${YOUR_DOMAIN}/payment-failure`,
});
Here are the events I have subscribed to in Webhooks
payment_intent.succeeded
checkout.session.completed
Object Received in Payment Intent Succeeded
{
"id": "evt_1KEqIxI5cib7rtVMoKMkak96",
"object": "event",
"api_version": "2020-03-02",
"created": 1641453754,
"data": {
"object": {
"id": "pi_1KEqIeI5cib7rtVMcz8zsXys",
"object": "payment_intent",
"amount": 59700,
"amount_capturable": 0,
"amount_received": 59700,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": null,
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"charges": {
"object": "list",
"data": [{
"id": "ch_1KEqIvI5cib7rtVMYUVn5gfQ",
"object": "charge",
"amount": 59700,
"amount_captured": 59700,
"amount_refunded": 0,
"application": null,
"application_fee": null,
"application_fee_amount": null,
"balance_transaction": "txn_1KEqIwI5cib7rtVMGfJlEahg",
"billing_details": {
"address": {
"city": "NY",
"country": "US",
"line1": "sada",
"line2": "asd",
"postal_code": "10001",
"state": "NY"
},
"email": "test#gmail.com",
"name": "John Doe",
"phone": null
},
"calculated_statement_descriptor": "VIDEOFORM",
"captured": true,
"created": 1641453753,
"currency": "usd",
"customer": "cus_KufeYc1hifvZGA",
"description": null,
"destination": null,
"dispute": null,
"disputed": false,
"failure_code": null,
"failure_message": null,
"fraud_details": {},
"invoice": null,
"livemode": false,
"metadata": {},
"on_behalf_of": null,
"order": null,
"outcome": {
"network_status": "approved_by_network",
"reason": null,
"risk_level": "normal",
"risk_score": 25,
"seller_message": "Payment complete.",
"type": "authorized"
},
"paid": true,
"payment_intent": "pi_1KEqIeI5cib7rtVMcz8zsXys",
"payment_method": "pm_1KEqIuI5cib7rtVMYPWlLV8S",
"payment_method_details": {
"card": {
"brand": "visa",
"checks": {
"address_line1_check": "pass",
"address_postal_code_check": "pass",
"cvc_check": "pass"
},
"country": "US",
"exp_month": 1,
"exp_year": 2023,
"fingerprint": "QaiTi5PATFO8ZoC3",
"funding": "credit",
"installments": null,
"last4": "4242",
"mandate": null,
"network": "visa",
"three_d_secure": null,
"wallet": null
},
"type": "card"
},
"receipt_email": null,
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/acct_1GhUSuI5cib7rtVM/ch_1KEqIvI5cib7rtVMYUVn5gfQ/rcpt_KufeysPW3LD8Yu47q14iYOIIlcGth9h",
"refunded": false,
"refunds": {
"object": "list",
"data": [],
"has_more": false,
"total_count": 0,
"url": "/v1/charges/ch_1KEqIvI5cib7rtVMYUVn5gfQ/refunds"
},
"review": null,
"shipping": null,
"source": null,
"source_transfer": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
}],
"has_more": false,
"total_count": 1,
"url": "/v1/charges?payment_intent=pi_1KEqIeI5cib7rtVMcz8zsXys"
},
"client_secret": "pi_1KEqIeI5cib7rtVMcz8zsXys_secret_uZwm3uziwfaWePgTHENYXeraD",
"confirmation_method": "automatic",
"created": 1641453736,
"currency": "usd",
"customer": "cus_KufeYc1hifvZGA",
"description": null,
"invoice": null,
"last_payment_error": null,
"livemode": false,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1KEqIuI5cib7rtVMYPWlLV8S",
"payment_method_options": {
"card": {
"installments": null,
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": ["card"],
"processing": null,
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
},
"livemode": false,
"pending_webhooks": 3,
"request": {
"id": "req_Y87umQuitz9WCc",
"idempotency_key": "a4b6af76-73d8-49b4-8393-9017e673af7e"
},
"type": "payment_intent.succeeded"
}
Object Received in Checkout Session Completed
{
"id": "evt_1KEqQOI5cib7rtVMRwAHWDvV",
"object": "event",
"api_version": "2020-03-02",
"created": 1641454214,
"data": {
"object": {
"id": "cs_test_a1AQ9EKIaxi8dXFAJzZ86xYm5meRkWb9Vu0eLowfkiKgUO4cyToooBzSTd",
"object": "checkout.session",
"after_expiration": null,
"allow_promotion_codes": null,
"amount_subtotal": 59700,
"amount_total": 59700,
"automatic_tax": {
"enabled": false,
"status": null
},
"billing_address_collection": null,
"cancel_url": "http://localhost:8000/payment-failure",
"client_reference_id": null,
"consent": null,
"consent_collection": null,
"currency": "usd",
"customer": "cus_Kuflo6N0n4HTzL",
"customer_details": {
"email": "test#gmail.com",
"phone": null,
"tax_exempt": "none",
"tax_ids": []
},
"customer_email": "test#gmail.com",
"expires_at": 1641540596,
"livemode": false,
"locale": null,
"mode": "payment",
"payment_intent": "pi_1KEqQ4I5cib7rtVMyND6NhQG",
"payment_method_options": {},
"payment_method_types": ["card"],
"payment_status": "paid",
"phone_number_collection": {
"enabled": false
},
"recovered_from": null,
"setup_intent": null,
"shipping": null,
"shipping_address_collection": null,
"shipping_options": [],
"shipping_rate": null,
"status": "complete",
"submit_type": null,
"subscription": null,
"success_url": "http://localhost:8000/payment-success",
"total_details": {
"amount_discount": 0,
"amount_shipping": 0,
"amount_tax": 0
},
"url": null
}
},
"livemode": false,
"pending_webhooks": 4,
"request": {
"id": null,
"idempotency_key": null
},
"type": "checkout.session.completed"
}
I'm unable to figure out how to get the Product ID and the Quantity. Could anyone suggest the right approach here?
You can find the Product and the quantity from the Checkout Session by using expand on the line_items property. The code should look like this.
// In "checkout.session.completed" event handler, get the ID of the Checkout Session
const id = event.data.object.id; // "cs_xxx"
// Retrieve the Checkout Session with expand
const session = await stripe.checkout.sessions.retrieve(id, {
expand: [ "line_items" ]
});
// Get the quantity
console.log(session.line_items.data[0].quantity);
// Get the product ID
console.log(session.line_items.data[0].price.product);
I'm trying to work with loops and item(s) and I can't get it to work... maybe you can help me.
So I want to print in a loop the "content" value of this output and I'm unable to do this. Do
- name: "Verify started instances"
uri:
url: "http://localhost:808{{ item[-1] }}/url"
method: GET
return_content: yes
register: status
until: "status is search('Version')"
retries: 3
delay: 60
ignore_errors: yes
with_items: "{{ instances_running.stdout_lines }}"
- debug:
msg: "{{ item }}"
with_items: "{{ status }}"
ignore_errors: yes
Output looks like that:
TASK [[AppServerAgent] verify started instances] **************************************************************************************************************************************
FAILED - RETRYING: [AppServerAgent] verify started instances (3 retries left).
FAILED - RETRYING: [AppServerAgent] verify started instances (2 retries left).
ok: [SERVER] => (item=inst0)
FAILED - RETRYING: [AppServerAgent] verify started instances (3 retries left).
FAILED - RETRYING: [AppServerAgent] verify started instances (2 retries left).
FAILED - RETRYING: [AppServerAgent] verify started instances (1 retries left).
failed: [SERVER] (item=instnull) => {"ansible_loop_var": "item", "attempts": 3, "changed": false, "item": "instnull", "msg": "invalid literal for int() with base 10: '808l'", "status": -1, "url": "http://localhost:808l/url"}
...ignoring
TASK [debug] **************************************************************************************************************************************************************************
ok: [SERVER] => {
"msg": {
"changed": false,
"failed": true,
"msg": "All items completed",
"results": [
{
"ansible_loop_var": "item",
"attempts": 3,
"changed": false,
"connection": "close",
"content": "Version: 2-SNAPSHOT\nBuild number: 1\nBuild id: 2020-11-325_09-03-20\n",
"content_length": "281",
"cookies": {},
"cookies_string": "",
"date": "",
"elapsed": 0,
"failed": false,
"invocation": {
"module_args": {
"attributes": null,
"backup": null,
"body": null,
"body_format": "raw",
"client_cert": null,
"client_key": null,
"content": null,
"creates": null,
"delimiter": null,
"dest": null,
"directory_mode": null,
"follow": false,
"follow_redirects": "safe",
"force": false,
"force_basic_auth": false,
"group": null,
"headers": {},
"http_agent": "ansible-httpget",
"method": "GET",
"mode": null,
"owner": null,
"regexp": null,
"remote_src": null,
"removes": null,
"return_content": true,
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"src": null,
"status_code": [
200
],
"timeout": 30,
"unix_socket": null,
"unsafe_writes": null,
"url": "http://localhost:8080/url",
"url_password": null,
"url_username": null,
"use_proxy": true,
"validate_certs": true
}
},
"item": "inst0",
"msg": "OK (281 bytes)",
"redirected": false,
"status": 200,
"url": "http://localhost:8080/url"
},
{
"ansible_loop_var": "item",
"attempts": 3,
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"attributes": null,
"backup": null,
"body": null,
"body_format": "raw",
"client_cert": null,
"client_key": null,
"content": null,
"creates": null,
"delimiter": null,
"dest": null,
"directory_mode": null,
"follow": false,
"follow_redirects": "safe",
"force": false,
"force_basic_auth": false,
"group": null,
"headers": {},
"http_agent": "ansible-httpget",
"method": "GET",
"mode": null,
"owner": null,
"regexp": null,
"remote_src": null,
"removes": null,
"return_content": true,
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"src": null,
"status_code": [
200
],
"timeout": 30,
"unix_socket": null,
"unsafe_writes": null,
"url": "http://localhost:808l/url",
"url_password": null,
"url_username": null,
"use_proxy": true,
"validate_certs": true
}
},
"item": "instnull",
"msg": "invalid literal for int() with base 10: '808l'",
"status": -1,
"url": "http://localhost:808l/url"
}
]
}
}
I was trying to use something like this:
- debug:
msg: "{{ item.content.split('\n') }}"
with_items: "{{ status }}"
ignore_errors: yes
but then the output looks like that:
TASK [debug] **************************************************************************************************************************************************************************
fatal: [SERVER]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'ansible.utils.unsafe_proxy.AnsibleUnsafeBytes object' has no attribute 'content'\n\nThe error appears to be in '/deploy.yaml': line 176, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - debug:\n ^ here\n"}
How can I do this?
Or maybe there is also a way to use other command instead of until: "status is search('Version')" to find content field and print output in name block instead of debug task?
THanks!
Try "{{ status.results.content }}"
I'm building a web app which sells several products, each product corresponds to a pricing plan. All the payment system is managed by Stripe.
It happens very often that a user has a subscription that contains Product A (i.e., one pricing plan), and then he wants to add Product B (i.e., another pricing plan) to the same subscription. I want to know how to achieve this by APIs of Stripe.
There is a webpage of Stripe to update a subscription (e.g., https://dashboard.stripe.com/test/subscriptions/sub_H4pQGW8nnc80vF/edit where sub_H4pQGW8nnc80vF is the subscription ID). Let's assume this customer already has 1 Verificator in the subscription, and then he wants to add 1 Pretty Formula to the same subscription. I do this update via the website. Here is the log:
Here is the full Request POST body:
{
"items": {
"0": {
"billing_thresholds": "",
"deleted": "false",
"id": "si_H4pQal4ZxGzLbW",
"quantity": "1",
"tax_rates": ""
},
"1": {
"billing_thresholds": "",
"plan": "plan_Gz6i9yPVIjrDPX",
"deleted": "false",
"quantity": "1"
}
},
"off_session": "true",
"prorate": "true",
"cancel_at": "",
"days_until_due": "30",
"default_tax_rates": "",
"collection_method": "send_invoice",
"billing_thresholds": "",
"enable_incomplete_payments": "false",
"invoice_settings": {
"description": "",
"send_hosted_payment_email": "true",
"supported_payment_methods": {
"ach_credit_transfer": "false",
"au_becs_debit": "false",
"bancontact": "false",
"card": "true",
"fpx": "false",
"giropay": "false",
"ideal": "false",
"jp_credit_transfer": "false",
"paper_check": "false",
"sepa_credit_transfer": "false",
"sofort": "false"
},
"custom_fields": "",
"footer": ""
},
"default_payment_method": "",
"default_source": ""
}
Here is the full Response body:
{
"id": "sub_H4pQGW8nnc80vF",
"object": "subscription",
"application_fee_percent": null,
"billing_cycle_anchor": 1586597833,
"billing_thresholds": null,
"cancel_at": null,
"cancel_at_period_end": false,
"canceled_at": null,
"collection_method": "send_invoice",
"created": 1586597833,
"current_period_end": 1589189833,
"current_period_start": 1586597833,
"customer": "5e575130651c5721d808d25b",
"customer_email": "sdtikply#gmail.com",
"customer_name": "Thomas Joseph",
"days_until_due": 30,
"default_payment_method": null,
"default_source": null,
"default_tax_rates": [
],
"discount": null,
"ended_at": null,
"invoice_settings": {
"send_hosted_payment_email": true,
"supported_payment_methods": {
"ach_credit_transfer": false,
"au_becs_debit": false,
"bancontact": false,
"card": true,
"fpx": false,
"giropay": false,
"ideal": false,
"jp_credit_transfer": false,
"paper_check": false,
"sepa_credit_transfer": false,
"sofort": false
}
},
"items": {
"object": "list",
"data": [
{
"id": "si_H4pQal4ZxGzLbW",
"object": "subscription_item",
"billing_thresholds": null,
"created": 1586597833,
"metadata": {
},
"plan": {
"id": "plan_Ga6n9yMYCDnHCu",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": 500,
"amount_decimal": "500",
"billing_scheme": "per_unit",
"created": 1579512574,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": {
},
"name": "Verificator",
"nickname": "Verificator",
"owning_merchant": "acct_1CiOQBEV4K2GahYL",
"owning_merchant_info": "acct_1CiOQBEV4K2GahYL",
"product": "prod_Ga6mVdA8KXyZ8I",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"quantity": 1,
"subscription": "sub_H4pQGW8nnc80vF",
"tax_rates": [
]
},
{
"id": "si_H82ES9BdIKZCNG",
"object": "subscription_item",
"billing_thresholds": null,
"created": 1587337381,
"metadata": {
},
"plan": {
"id": "plan_Gz6i9yPVIjrDPX",
"object": "plan",
"active": true,
"aggregate_usage": null,
"amount": 500,
"amount_decimal": "500",
"billing_scheme": "per_unit",
"created": 1585278262,
"currency": "usd",
"interval": "month",
"interval_count": 1,
"livemode": false,
"metadata": {
},
"name": "Pretty Formula",
"nickname": "Pretty Formula",
"owning_merchant": "acct_1CiOQBEV4K2GahYL",
"owning_merchant_info": "acct_1CiOQBEV4K2GahYL",
"product": "prod_GxqkRFdI08DvyR",
"tiers": null,
"tiers_mode": null,
"transform_usage": null,
"trial_period_days": null,
"usage_type": "licensed"
},
"quantity": 1,
"subscription": "sub_H4pQGW8nnc80vF",
"tax_rates": [
]
}
],
"has_more": false,
"total_count": 2,
"url": "/v1/subscription_items?subscription=sub_H4pQGW8nnc80vF"
},
"latest_invoice": "in_1GWfm1EV4K2GahYLlmtUEISo",
"livemode": false,
"metadata": {
},
"next_pending_invoice_item_invoice": null,
"owning_merchant": "acct_1CiOQBEV4K2GahYL",
"owning_merchant_info": "acct_1CiOQBEV4K2GahYL",
"pause_collection": null,
"pending_invoice_item_interval": null,
"pending_setup_intent": null,
"pending_update": null,
"plan": null,
"quantity": null,
"schedule": null,
"start_date": 1586597833,
"status": "active",
"tax_percent": null,
"trial_end": null,
"trial_start": null
}
So my question is, how can I code in my backend (Node.js) to achieve exactly the same thing?
You just need to use the Update Subscription API and provide the items portion just as you're seeing above:
"items": {
"0": {
"billing_thresholds": "",
"deleted": "false",
"id": "si_H4pQal4ZxGzLbW",
"quantity": "1",
"tax_rates": ""
},
"1": {
"billing_thresholds": "",
"plan": "plan_Gz6i9yPVIjrDPX",
"deleted": "false",
"quantity": "1"
}
},
The first item is the existing Subscription Item (si_), and the second one is the new one you want to add.
I use the python-whois module.
I have this code:
for whoisInfo in domainWhoisInfo :
stringWhoisInfo = str(stringWhoisInfo) + str(whoisInfo) + "\n\n"
domainWhoisInfo => array which contains whois data of each domain
stringWhoisInfo => string which concatenate whois data of all domains
I concatenate whois results of many domain name in a string.
And When I store these results in a log file I get the
following output :
{
"updated_date": null,
"status": null,
"name": null,
"dnssec": null,
"city": null,
"expiration_date": null,
"zipcode": null,
"domain_name": null,
"country": null,
"whois_server": null,
"state": null,
"registrar": null,
"referral_url": null,
"address": null,
"name_servers": null,
"org": null,
"creation_date": null,
"emails": null
}
{
"updated_date": null,
"status": [
"clientDeleteProhibited -- http://www.icann.org/epp#clientDeleteProhibited",
"clientTransferProhibited -- http://www.icann.org/epp#clientTransferProhibited",
"serverTransferProhibited -- http://www.icann.org/epp#serverTransferProhibited"
],
"name": "Panayiotis Yianni",
"dnssec": null,
"city": "Enfield",
"expiration_date": "2017-03-06 23:25:46",
"zipcode": "EN3 7FY",
"domain_name": "AMON.PRO",
"country": "GB",
"whois_server": null,
"state": "London, City of",
"registrar": "OVH (R2367-PRO)",
"referral_url": null,
"address": null,
"name_servers": [
"DNS200.ANYCAST.ME",
"NS200.ANYCAST.ME"
],
"org": "Amon Interactive Ltd",
"creation_date": null,
"emails": [
"panayiotisyianni#live.com",
"panayiotis#amon.pro"
]
}
{
"updated_date": null,
"status": null,
"name": null,
"dnssec": null,
"city": null,
"expiration_date": null,
"zipcode": null,
"domain_name": null,
"country": null,
"whois_server": null,
"state": null,
"registrar": null,
"referral_url": null,
"address": null,
"name_servers": null,
"org": null,
"creation_date": null,
"emails": null
}
I am looking for deleting the whois results which are null
from my string.
And get finally only this output :
{
"updated_date": null,
"status": [
"clientDeleteProhibited -- http://www.icann.org/epp#clientDeleteProhibited",
"clientTransferProhibited -- http://www.icann.org/epp#clientTransferProhibited",
"serverTransferProhibited -- http://www.icann.org/epp#serverTransferProhibited"
],
"name": "Panayiotis Yianni",
"dnssec": null,
"city": "Enfield",
"expiration_date": "2017-03-06 23:25:46",
"zipcode": "EN3 7FY",
"domain_name": "AMON.PRO",
"country": "GB",
"whois_server": null,
"state": "London, City of",
"registrar": "OVH (R2367-PRO)",
"referral_url": null,
"address": null,
"name_servers": [
"DNS200.ANYCAST.ME",
"NS200.ANYCAST.ME"
],
"org": "Amon Interactive Ltd",
"creation_date": null,
"emails": [
"panayiotisyianni#live.com",
"panayiotis#amon.pro"
]
}