-
python concat auto insert backslash i can't remove
I have a problem with my python concat, as you see the value of "item" holds the right value, but when i add it to a string, it inserts backslashes. I have tried with replace, rstrip and strip. Non of them worked.I don't know if I am missing something, hope you can help.
a prints:
`'"name": "[parameters(\'dynamicsax_1_Connection_Name\')]"'`
item prints:
`'dynamicsax_1_Connection_Name'
`Code:
`entries = Path("C:\\Users\\Aske.Meyer\\D365 Integration\\ERPD365AzureResources\\LogicApps")
my_list_of_param = ['dynamicsax_1_Connection_Name', 'dynamicsax_2_Connection_Name','dynamicsax_3_Connection_Name',
'servicebus_2_Connection_Name','servicebus_3_Connection_Name','servicebus_3_Connection_DisplayName',
'servicebus_4_Connection_Name', 'servicebus_6_Connection_Name', 'servicebus_6_Connection_DisplayName',
'documentdb_1_Connection_Name', 'documentdb_1_Connection_DisplayName', 'documentdb_1_databaseAccount']
empty_list= []
found_params = []
not_found_params = []
for entry in entries.iterdir():
with open(entry) as file:
print(file.name)
content = json.load(file) #exclude param files
parameter = content['parameters']
for item in my_list_of_param:
param_name = "\"name\": \"[parameters(\'"+item+"\')]\""
a = param_name.replace("\\", "")
print(a)
print(item)`
Log In to reply.
Popular Salesforce Blogs
Future-Proof Your Business: The Importance of Salesforce in Today's Market
In the ever-evolving landscape of modern business, staying ahead of the curve is not just an advantage; it's a necessity. As a business owner, you…
How To Integrate Salesforce And SharePoint Online Through Files Connect?
Salesforce is notoriously infamous for its low storage space and a relatively lacking document management capabilities. To be fair the Software-as-a-Service CRM platform was not aimed at…
Problem Solving | Salesforce Project Implementation
'I am happy to help you', I replied to a post on a Salesforce group. A group member posted a roadblock in his recent Salesforce…
Popular Salesforce Videos
Customer Overview: How Our Customer Used Salesforce Industries i.e Vlocity For It’s Business?
Let's have a glance at our customer success story to understand what is Salesforce Industries in detail. Watch this video and do let us know…
Introduction to Salesforce OmniStudio | Salesforce Industries
Introduction to Salesforce OmniStudio: The Salesforce OmniStudio digital engagement suite makes it easy to click-configure rich, consumer-grade user experiences based on objects, APEX classes, REST…
AMPscript Personalised Subject Lines in Salesforce Marketing Cloud
Cameron Robert from Datarati demonstrates how to use Subscriber Data and AMPscript to personalize your email Subject Lines in Salesforce Marketing Cloud. What you'll learn:…
Popular Salesforce Infographics
6 Tips to Evaluate the Right Salesforce QA Vendor
Salesforce is the ultimate customer success platform, which makes it important to choose the right partner for your Salesforce project especially because it governs your…
How Does Salesforce Use Slack To Collaborate and Connect?
Salesforce and Slack bring together all your teams with the apps and data they need in a single, collaborative workspace. Plus, Slack Connect functionality lets…
What Is Mobile Marketing Automation?
Mobile use is booming, and it’s not slowing down anytime soon. In fact, research from eMarketer suggests that between 2015 and 2021, mobile-only internet users…